Skip to content

Instantly share code, notes, and snippets.

@Robofied
Created February 4, 2019 19:42
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save Robofied/e9f1831e316f9f2e3710cb7545120f20 to your computer and use it in GitHub Desktop.
l = ['a' ,'b', 'c']
## It is printing in new line each entry
for e in l:
print(e)
#[Output]:
#a
#b
#c
## Printing with space
for e in l:
print(e, end =' ')
#[Output]:
#a b c
## Printing with a separator
print(*l , sep =',')
#[Output]:
#a,b,c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment