Home > other >  Python file
Python file

Time:11-30

I want to use with the open w pattern to create a file to write some data
The data in the form of tuple
But the open can only write the string
What method can solve this

CodePudding user response:

1, before writing to string
Youtuple=(1, 2, 3)
F.w rite (STR (youtuple))

2, with wb mode



  • Related