This is 1 minute python tutorial.
Learn something new in Python today.
In order to repeat a character/string/number in python you can simply use the repeating operator(*)/multiply it by the number of times you want to repeat it.
For Example:
print("i" * 3)
will print the character 'i' 3 times.
iii
You can use this trick to create number pattern or star pattern in python etc..
for i in range(1,6):
print("# " * i)
# #
# #
# # #
# # # #
-----
PLAYLIST with more python #Shorts:
• Python #Shorts by OsChannel
Subscribe to OsChannel for more such tricks -
CHANNEL LINK:
/ oschanneldotcom
LINK TO WEBSITE:
https://oschannel.com
Auf dieser Seite können Sie das Online-Video Python Repetition Operator | Repeat a Character/String/Number in Python | mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer OsChannel 19 Juli 2021 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 189 Mal angesehen und es wurde von 9 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!