Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. with open("file.csv", "r") as file:
  2. myFile = csv.reader(file, delimiter = ",")
  3. for row in myFile:
  4. print row
  5.  
  6. with open("file.csv", "r") as file:
  7. myFile = csv.reader(file, delimiter = ",")
  8. for row in myFile:
  9. print ",".join(row)
  10.  
  11. unicode_str = 'åäö'
  12. unicode_str_list = [unicode_str, unicode_str]
  13. print 'unwrapped:', unicode_str
  14. print 'in list:', unicode_str_list
  15. print 'repr:', repr(unicode_str)
  16. print 'str:', str(unicode_str)
  17.  
  18. unwrapped: åäö
  19. in list: ['xc3xa5xc3xa4xc3xb6', 'xc3xa5xc3xa4xc3xb6']
  20. repr: 'xc3xa5xc3xa4xc3xb6'
  21. str: åäö
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement