Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Better Coding request
#1
start = 5
for i in range(start):
    if i == 0:
        print('##')
    else:
        print('#',i*'o','#',sep='')
Output:
I am getting my Expected Output ## #o# #oo# #ooo# #oooo#
I am a Python Learner, would like to know if in what other way we can code better than above code, please suggest
Reply


Messages In This Thread
Better Coding request - by aankrose - May-08-2019, 08:47 PM
RE: Better Coding request - by Yoriz - May-08-2019, 09:01 PM
RE: Better Coding request - by Gribouillis - May-08-2019, 09:41 PM
RE: Better Coding request - by perfringo - May-09-2019, 05:46 AM
RE: Better Coding request - by aankrose - May-09-2019, 01:38 PM
RE: Better Coding request - by perfringo - May-09-2019, 01:54 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  how can I correct the Bad Request error on my curl request tomtom 8 5,120 Oct-03-2021, 06:32 AM
Last Post: tomtom
  ImportError: cannot import name 'Request' from 'request' abhishek81py 1 3,960 Jun-18-2020, 08:07 AM
Last Post: buran
  mini coding request randy 1 1,974 Mar-02-2020, 09:14 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020