• Courses
  • Code Compiler
  • Discuss
  • Pricing
  • Teams
Menu
+ 1

How to convert list to integer.?

[1,2,3] to 123 in int type. Python

python
2nd Jan 2019, 6:17 AM
Hardik Suthar
Hardik Suthar - avatar
1 Answer
+ 6
l = [1, 2, 3] i = int(''.join([str(n) for n in l]))
2nd Jan 2019, 6:34 AM
Anna
Anna - avatar

Often have questions like this?

Learn more efficiently, for free:

  • Introduction to Python

    7.1M learners

  • Introduction to Java

    4.7M learners

  • Introduction to C

    1.5M learners

  • Introduction to HTML

    7.5M learners

See all courses
Hot today
I tried changing my username already to see if the name on the certificates will change but they didn’t .
1 Votes
‘async’ keyword
2 Votes
Started learning python
0 Votes
Hi guys I’m enjoying learning but problem is practice
0 Votes
Websites for frontend developers
1 Votes
Discrete mathematics (python)
0 Votes
Computador
0 Votes
I need help in programing
0 Votes
Error in Ethical AI Foundations course
1 Votes
C++, c# , graphical interface
1 Votes