Thursday 17 February 2022

Python practice programs for beginners - Day 18

Python practice programs for beginners - millioninformations

 Day 17 Solution:



Day 18: Introduction to List

A list is a collection of items. The items can be of any type.

Example: [1,2,3,5.5,"a",True]

How to print a list in Python?

Output: 

[1, 2, 3, 4, 5.5, True]


But if we want to print the list items alone we need to use for loop.



Output:

1

2

3

4

5.5

True


Day 18 Task: Create a list for latest gadgets and display it.





1 comment :

  1. 👍 nice. all the best for your Python practice programs for beginners

    ReplyDelete