Tuple
A tuple is similar to a list but is immutable, meaning its elements cannot be changed once defined. It is like a fixed sequence of items. Once it’s set, the items cannot be changed. It’s like having a locked box with things inside.
Example 1: the coordinates of a point (x, y) on a map, where the values are fixed.
Python
coordinates = ( 3 , 4 ) print (coordinates) |
(3, 4)
Let’s understand Tuple with one more example:
Example 2: You have a tuple representing the days of the week: (“Monday”, “Tuesday”, “Wednesday”). You can’t add or remove days from the tuple because it’s fixed.
Python
Days = ( "Sunday" , "Monday" , "Tuesday" ) print (Days) |
('Sunday', 'Monday', 'Tuesday')
Python for Kids – Fun Tutorial to Learn Python Programming
Python for Kids – Python is an easy-to-understand and good-to-start programming language. In this Python tutorial for kids or beginners, you will learn Python and know why it is a perfect fit for kids to start. Whether the child is interested in building simple games, creating art, or solving puzzles, Python provides the foundation to the kids or any beginner for their coding journey.
Programming is an essential skill in today’s world because programming is used everywhere in our surroundings. And to learn programming, we have to learn a programming language and Python is the best to start with programming language. It has a simple syntax and readability is the best choice for kids to understand programming concepts. In this Python tutorial, you’ll learn all the basic concepts, installation processes, and fundamental programming concepts.
Contact Us