Nov-08-2019, 09:00 PM
if given a number as str, int or float, you can add 1 to it and convert it back to the same type easily:
def inc(num): return type(num)(float(num)+1)how can this be made to also work with bytes? note: it's OK for the return as str to have '.0' in it; it just needs to be str if str was given. i want this to also work if bytes is given; bytes is to be returned when bytes is given.
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.