Python Forum
What does ty(val) mean?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What does ty(val) mean?
#2
zip(types,raw) create an iterator that produces tuples of the form (x, y)
>>> >>> list(zip(types,raw))
[(<class 'str'>, 'yosi'), (<class 'int'>, ' 1'), (<class 'float'>, ' 3.14')]
>>> for ty,val in zip(types,raw):
...   print("ty:",ty,"val:",str(val))
...
ty: <class 'str'> val: yosi
ty: <class 'int'> val:  1
ty: <class 'float'> val:  3.14
Reply


Messages In This Thread
What does ty(val) mean? - by liagym - May-04-2020, 09:09 AM
RE: What does ty(val) mean? - by anbu23 - May-04-2020, 09:29 AM
RE: What does ty(val) mean? - by buran - May-04-2020, 11:52 AM

Forum Jump:

User Panel Messages

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