How to convert strings into integers in Python?

后端 未结 15 2225
自闭症患者
自闭症患者 2020-11-22 01:33

I have a tuple of tuples from a MySQL query like this:

T1 = ((\'13\', \'17\', \'18\', \'21\', \'32\'),
      (\'07\', \'11\', \'13\', \'14\', \'28\'),
               


        
15条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-11-22 01:47

    I want to share an available option that doesn't seem to be mentioned here yet:

    rumpy.random.permutation(x)
    

    Will generate a random permutation of array x. Not exactly what you asked for, but it is a potential solution to similar questions.

提交回复
热议问题