Jul-24-2018, 08:21 PM
which of these is easiest to read?
#0
#0
if t is str: return ''.join([chr(c) for c in o]) if t is unicode: return unicode(''.join([chr(c) for c in o])) if t is list: return o if t is tuple: return tuple(o) if t is set: return set(o) if t is bytearray: return bytearray(o) if t is bytes: return bytes(bytearray(o))#1
s = ''.join([chr(c) for c in o]) if t is str: return s if t is unicode: return unicode(s) if t is list: return o if t is tuple: return tuple(o) if t is set: return set(o) a = bytearray(o) if t is bytearray: return a if t is bytes: return bytes(a)#2
s = ''.join([chr(c) for c in o]) if t is str: return s if t is unicode: return unicode(s) if t is list: return o if t is tuple: return tuple(o) if t is set: return set(o) a = bytearray(o) if t is bytearray: return a if t is bytes: return bytes(a)#3
if t is str: return ''.join([chr(c) for c in o]) if t is unicode: return unicode(''.join([chr(c) for c in o])) if t is list: return o if t is tuple: return tuple(o) if t is set: return set(o) if t is bytearray: return bytearray(o) if t is bytes: return bytes(bytearray(o))
Tradition is peer pressure from dead people
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.