How will i create a python program that displays a text hotizontally and vertically on the background | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

How will i create a python program that displays a text hotizontally and vertically on the background

20th Oct 2020, 1:57 PM
muhammad zakari
muhammad zakari - avatar
4 Respostas
+ 4
print("hello \n h \n e \n l \n l \n o")
20th Oct 2020, 2:02 PM
Ananiya Jemberu
Ananiya Jemberu - avatar
+ 1
Like a sample? How?
20th Oct 2020, 1:59 PM
Jayakrishna šŸ‡®šŸ‡³
+ 1
Um... text is always outputted horizontally. For vertical you can write a function that takes input, outputs them one by one with a line break def vertical_print(text): for c in text: print(c) or a one-liner since its my fetish print("\n".join([c for c in text]))
20th Oct 2020, 2:32 PM
恋悓恧悓
恋悓恧悓 - avatar
+ 1
You can use join method as well to represent a horizontal text vertically instead of writing many \n print("\n".join("hello")) But it depends on what you want to do actually
20th Oct 2020, 2:56 PM
Abhay
Abhay - avatar