2021年5月1日星期六

Int / float/ bool to strings, then put them in a file

Okay, so i have already went through the process of turning things into ints and floats and bools. I had to do it for a catalog.

my question is, how to I get those ints, floats, and books and turn them into strings and then put them back into a file.

newCode = int(input('What is the code?'))          newPrice = float(input('What is the new price?'))          newDesc = input('what is the new Description?')          if input('Is it taxable? t or f: ') == 't':              newTaxable = True          else:              newTaxable = False          Cat[newCode] = item(newDesc, newPrice, newTaxable)  
https://stackoverflow.com/questions/67352407/int-float-bool-to-strings-then-put-them-in-a-file May 02, 2021 at 10:08AM

没有评论:

发表评论