“TypeError: 'NoneType' object is not callable” when adding lists to dictionary

前端 未结 3 410
情深已故
情深已故 2021-01-23 20:28

I\'m creating a function that consolidates a couple of lists into a string and am encountering the below error.

Traceback (most recent call last):
  File \"Tradi         


        
3条回答
  •  鱼传尺愫
    2021-01-23 21:16

    #Use Of Zip() function

    #Generate tuple

    x=zip( range(5), range(1,20,2) ) print("Tuple : ",tuple(x))

    #Generate List

    x=zip( range(5), range(1,20,2) ) print("List : ",list(x))

    #Generate dictonary

    x=zip( range(5), range(1,20,2) ) print("Dictonary : ",dict(x))

提交回复
热议问题