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

Publicado em: 19 Julho 2021
no 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


Nesta página do site você pode assistir ao vídeo on-line Python Repetition Operator | Repeat a Character/String/Number in Python | duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário OsChannel 19 Julho 2021, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 189 vezes e gostou 9 espectadores. Boa visualização!