Tuple into the list, string, or list into a tuple and its type, in Python
What is min and max in Python?
This article is very interesting and Lesser known functions of Python, i.e max ()
And min (). Now when they are compared to C ++. The opposition, which makes only two arguments,
That too strictly float, int or char, these Functions are not only limited to 2 elements but can hold many elements as arguments and can also support strings in their arguments, therefore lexicographically allowing even the smallest or largest string to be displayed.
Find Max() and Min() – Example
number = (12,5,15,5)
print(max(number)) # max 15
print(min(number)) # min 5
print(sum(number)) # sum 37
How to convert Tuple into List
# Conversion of Tuple into list,string or list
into tuple and it type
nums=(1,2,3,4,5,6,7,8,9) print(type(nums)) # <class,'tuple' nums1=list(nums) print(nums1) # OutPut = [1,2,3,4,5,6,7,8,9]
How to convert Tuple into String
nums=(1,2,3,4,5,6,7,8,9)
print(type(nums1)) # OutPut = <class,’list> nums2=str(nums) print(type(nums2)) # OutPut = <class,’str’>
Related Post:
- Python Hello World Program
- Python Comment | Creating a Comment | multiline comment | example
- Python Dictionary Introduction | Why to use dictionary | with example
- How to do Sum or Addition in python
- Python Reverse number
- find common number in python
- addition of number using for loop and providing user input data in python
- Python Count char in String
- Python Last Character from String
- Python Odd and Even | if condition
- Python Greater or equal number
- Python PALINDROME NUMBER
- Python FIBONACCI SERIES
- Python Dictionary | Items method | Definition and usage
- Python Dictionary | Add data , POP , popitem , update method
- Python Dictionary | update() method
- Delete statement , Looping in list In Python
- Odd and Even using Append in python
- Python | Simple Odd and Even number
learn more about salesforce