Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list = ['A','B','C','D','E','F','G']
- start=0
- end=len(list)
- while start <end:
- new_list=list[:end-start]
- res =''.join(new_list) + ' ' *(start *2 - 1) + ''.join(new_list[::-1])
- if start==0:
- res=res.replace(list[-1], '', 1)
- print(res)
- start +=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement