0

I am new to python and started working on strings, So I figured out that input() takes string as default even it is a integer, So what I need is to convert the given integer into list of integers and again merge them into a string.

I have tried this code

p=input()
q=integer(input())
print(str(q))

And got the error message invalid type conversion, I want to convert it into integer and split each digit to a list of integer.

  • Welcome to stack overflow. Please [edit] your question to include the value you are inputting, and the full traceback of the error, to make a [mcve] so that we can better understand. As it is, your code should be giving `NameError: name 'integer' is not defined` because the conversion to integer is acomplished with `int()` – G. Anderson Apr 04 '23 at 15:58

0 Answers0