0

How do i print this in python but in center

###### #### ### ## #

24th Sep 2020, 10:36 AM
Somil Khandelwal
4 odpowiedzi
+ 1
You can do like print("=====") print(" === ") Hashtag (#) may not give you good result
24th Sep 2020, 11:29 AM
Ananiya Jemberu
Ananiya Jemberu - avatar
+ 1
You can use .center() method. print("#####".center(max_str_length)) e.g. print('hi'.center(9)) print('world!'.center(9)) output: hi world!
24th Sep 2020, 11:43 AM
Russ
Russ - avatar
0
Ananaya Jemberu Jayakrishna🇮🇳 Russ this is my for i in range(5): for j in range(i-1) : print(i) for i2 in range(5): for j2 in range(i2-1) : print(i) print()
24th Sep 2020, 12:09 PM
Somil Khandelwal
0
is this right
24th Sep 2020, 12:12 PM
Somil Khandelwal