[go: up one dir, main page]

0% found this document useful (0 votes)
3 views1 page

List of Programs-27.09.22

The document lists various Python programs focusing on list manipulation and data conversion. It includes tasks such as appending elements, comparing lists, converting lists to dictionaries or sets, sorting mixed lists, and generating tuples from user input. Additionally, it features a program to find even-digit numbers within a specified range and a function to print a dictionary of squares for numbers 1 to 3.

Uploaded by

ahenas04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

List of Programs-27.09.22

The document lists various Python programs focusing on list manipulation and data conversion. It includes tasks such as appending elements, comparing lists, converting lists to dictionaries or sets, sorting mixed lists, and generating tuples from user input. Additionally, it features a program to find even-digit numbers within a specified range and a function to print a dictionary of squares for numbers 1 to 3.

Uploaded by

ahenas04
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

LIST OF PROGRAMS

1. Python Program to append element in the list

2. Python Program to compare two lists

3. Python Program to convert list to dictionary

4. Python Program to remove an element from a list

5. Python Program to add two lists

6. Python Program to convert List to Set

7. Python Program to convert list to string

8. Write a Python program to sort a given mixed list of integers and strings. Numbers must be
sorted before strings.
Original list:
[19, 'red', 12, 'green', 'blue', 10, 'white', 'green', 1]
Sort the said mixed list of integers and strings:
[1, 10, 12, 19, 'blue', 'green', 'green', 'red', 'white']
9. Write a program which accepts a sequence of comma-separated numbers from console and
generate a list and a tuple which contains every number.
Suppose the following input is supplied to the program:
34,67,55,33,12,98
Then, the output should be:
['34', '67', '55', '33', '12', '98']
('34', '67', '55', '33', '12', '98')

10. Write a program, which will find all such numbers between 1000 and 3000 (both
included) such that each digit of the number is an even number.
The numbers obtained should be printed in a comma-separated sequence on a single line.

11. Define a function which can print a dictionary where the keys are numbers between 1 and
3 (both included) and the values are square of keys.

You might also like