Can I store numbers in a list?

QuestionsQuestions8 SkillsProJava Double Sum MethodSep, 30 2025
0193

Yes, you can store numbers in a list in Python. Here's an example:

numbers = [1, 2, 3, 4, 5]
print(numbers)

This creates a list called numbers that contains the integers 1 through 5. You can also store floating-point numbers or a mix of different types in a list.

0 Comments

no data
Be the first to share your comment!