In this learning experience, I have learned how to work with lists and strings, use common list methods, use lists as stacks and queues, use list comprehensions to create new lists, and work with tuples. Additionally, I have learned about sequences, tuple packing and unpacking, and the del statement for deleting objects or elements from a data structure.
The pycache directory is a directory created by Python3 to store compiled bytecode files, which are generated to improve the performance of Python code execution.
Prototypes for functions written in this project:
| File | Prototype |
|---|---|
0-print_list_integer.py |
def print_list_integer(my_list=[]): |
1-element_at.py |
def element_at(my_list, idx): |
2-replace_in_list.py |
def replace_in_list(my_list, idx, element): |
3-print_reversed_list_integer.py |
def print_reversed_list_integer(my_list=[]): |
4-new_in_list.py |
def new_in_list(my_list, idx, element): |
5-no_c.py |
def no_c(my_string): |
6-print_matrix_integer.py |
def print_matrix_integer(matrix=[[]]): |
7-add_tuple.py |
def add_tuple(tuple_a=(), tuple_b=()): |
8-multiple_returns.py |
def multiple_returns(sentence): |
9-max_integer.py |
def max_integer(my_list=[]): |
10-divisible_by_2.py |
def divisible_by_2(my_list=[]): |
11-delete_at.py |
def delete_at(my_list=[], idx=0): |
Task-0: The 0-print_list_integer.py file contains a function that prints all integers of a list.
Task-1: The 1-element_at.py file contains a function that retrieves an element from a list like in C.
Task-2: The 2-replace_in_list.py file contains a function that replaces an element of a list at a specific position (like in C).
Task-3: The 3-print_reversed_list_integer.py contains a function that prints all integers of a list, in reverse order.
Task-4: The 4-new_in_list.py contain a function that replaces an element in a list at a specific position without modifying the original list (like in C).
Task-5: The 5-no_c.py file contains a function that removes all characters c and C from a string.
Task-6: The 6-print_matrix_integer.py file contains a function that prints a matrix of integers.
Task-7: The 7-add_tuple.py file contains a function that adds 2 tuples.
Task-8: The 8-multiple_returns.py file contains a function that returns a tuple with the length of a string and its first character.
Task-9: The 9-max_integer.py file contains a function that finds the biggest integer of a list.
Task-10: The 10-divisible_by_2.py file contains a function that finds all multiples of 2 in a list.
Task-11: The 11-delete_at.py file contains a function that deletes the item at a specific position in a list.
Task-12: The 12-switch.py file contains a function that switches the value of a and b