Python Repetition Operator | Repeat a Character/String/Number in Python |

Publicado el: 19 julio 2021
en el canal de: OsChannel
189
9

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


En esta página del sitio puede ver el video en línea Python Repetition Operator | Repeat a Character/String/Number in Python | de Duración hora minuto segunda en buena calidad , que subió el usuario OsChannel 19 julio 2021, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 189 veces y le gustó 9 a los espectadores. Disfruta viendo!