numbers = [12, 34, 23, 56, 45, 67]
max_number = max(numbers)
print('Maximum Number:', max_number)Find Maximum Number in List Using max() Function
Related Posts
More content you might like
Cheatsheet
python
Python List Operations Cheatsheet
my_list = ["banana", "apple", "cherry"]
my_list.sort()
print(my_list) # Output: ['apple', 'banana', 'cherry']my_list = [3, 1, 4, 1, 5, 9]
sorted_list = sorted(my_list)
print(sorted_list) # Output: [1, 1, 3, 4, 5, 9]Oct 24, 2024
Read More Code
python
Generate Fibonacci Sequence
def fibonacci(n):
if n <= 1:
return n
else:
return fibonacci(n-1) + fibonacci(n-2)
result = [fibonacci(i) for i in range(10)]
print('Fibonacci Sequence:', result)Jan 26, 2024
Read More Code
python
Calculate Sum of Numbers in a List Using sum() Function
No preview available for this content.
Jan 26, 2024
Read MoreDiscussion 0
Please sign in to join the discussion.
No comments yet. Be the first to share your thoughts!