how to convert a group of strings to integer?

0 votes
how do i convert a group of strings to integer ?
Mar 18 in Python by Waseem
• 4,480 points
22 views

1 answer to this question.

0 votes
a = ['1','2','3','4']
b = list(map(int,a))
print(b)

this is how you change the strings to integer.

answered Mar 18 by Mohammad
• 3,060 points

Related Questions In Python

0 votes
1 answer

How to sort a list of strings?

Basic answer: mylist = ["b", "C", "A"] mylist.sort() This modifies ...READ MORE

answered Jun 4, 2018 in Python by ariaholic
• 7,340 points
41 views
0 votes
1 answer

How to sort a list of strings?

Try  items = ["live", "like", "code", "cool", "bug"] ...READ MORE

answered Jul 27, 2018 in Python by Priyaj
• 56,900 points
25 views
0 votes
1 answer

How to convert an integer to a string using Python?

Here is an easy solution: def numberToBase(n, b): ...READ MORE

answered Nov 23, 2018 in Python by Nymeria
• 3,520 points

edited Dec 12, 2018 by Nymeria 44 views
0 votes
1 answer

How to perform string operations on every element of a list of strings?

This can be done using list comprehension ...READ MORE

answered Jul 18 in Python by Arvind
• 2,960 points
21 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 277 views
0 votes
1 answer

How do you convert a dictionary to a defaultdict?

from collections import defaultdict a = {1: 2, ...READ MORE

answered Aug 2 in Python by Mohammad
• 3,060 points
178 views
0 votes
1 answer

how do I check the length of an array in a python program?

lets say we have a list mylist = ...READ MORE

answered Mar 12 in Python by Mohammad
• 3,060 points
44 views