Python Reading lines in a file, then adding until there are a certain number of lines

前端 未结 0 1777
灰色年华
灰色年华 2020-11-29 01:20

I am trying to open and edit a file using Python. I need to be able to read how many lines are in the file, and if there are fewer then 5 lines add a random number from 0-10

相关标签:
回答
  • 消灭零回复
提交回复
热议问题