In Python, type of behavior will not change for data type. Below example is list containing integer type in string.so, we have to take all int type numbers from list even it is declared in string.
Input : list1 = [12, 'geek', 2, '41', 'for', 10, '8', 6, 4, 'geeks', 7, '10'] Output : 100 Input : list1 = [100, 'geek', 200, '400', 'for', 101, '2018', 64, 74, 'geeks', 27, '7810'] Output :10794
- Python | Convert mixed data types tuple list to string list
- Python | Convert List of String List to String List
- Python | Convert list of string to list of list
- Python | Ways to sum list of lists and return sum list
- Python - Remove empty value types in dictionaries list
- Python | Convert list of tuples to list of list
- Django model data types and fields list
- Python | Convert a string representation of list into list
- Python | Convert list of string into sorted list of integer
- Python | Convert list of numerical string to list of Integers
- Python | Convert string enclosed list to list
- Python | Convert string List to Nested Character List
- Python Program to convert List of Integer to List of String
- Python - Convert String List to Key-Value List dictionary
- Python - Filter the List of String whose index in second List contaons the given Substring
- Python | Maximum sum of elements of list in a list of lists
- Python | Check if given string can be formed by concatenating string elements of list
- Python | Check if string ends with any string in given list
- Python | Merge Tuple String List values to String
- Python | Sort each String in String list
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.