This commit is contained in:
2025-08-23 19:21:09 +05:30
parent 95fa260882
commit 0dccb17147
7 changed files with 10 additions and 9 deletions

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.venv .venv
__pycache__/ __pycache__/
*.pyc *.pyc
.vscode

View File

@@ -38,10 +38,10 @@ car: dict[str, Any] = {
x = ('key1', 'key2', 'key3') x = ('key1', 'key2', 'key3')
y = 0 y = 0
thisdict = dict.fromkeys(x, y) this_dict = dict.fromkeys(x, y)
print(thisdict) print(this_dict)
# setdefault # setdefault
car = { car = {

View File

@@ -5,7 +5,7 @@
try: try:
number = int('anikuttan') # invalid conversion number = int('anikuttan') # invalid conversion
except: except:
print("Something went worng") print("Something went wrong")
try: try:

View File

@@ -1,7 +1,7 @@
# All functions, variables, class are available from export # All functions, variables, class are available from export
# Python exports everything(functions, variables, classes) by default # Python exports everything(functions, variables, classes) by default
# See file3 for custome Exporting # See file3 for custom Exporting
from file3 import * from file3 import *
@@ -21,7 +21,7 @@ class Ani:
print_my_full_name() print_my_full_name()
hidden_function() # hidden_function" is not defined error # hidden_function() # hidden_function" is not defined error
print(my_name) print(my_name)

View File

@@ -1,6 +1,6 @@
# Example 1 # Example 1
# if i run this file directly the name will call once becaus python will run the file top to bottom # if i run this file directly the name will call once beaus python will run the file top to bottom
# so the function call will trigger and it prints my name # so the function call will trigger and it prints my name
def say_my_name_once(): def say_my_name_once():
print("Anikuttan example 1") print("Anikuttan example 1")

View File

@@ -23,7 +23,7 @@ print(tup)
# Python Sets # Python Sets
# Python set is an unordered collection # Python set is an unordered collection
# sets are mutable # sets are mutable
# unindexed and do not contain duplicates # unindex and do not contain duplicates
# The order of elements in a set is not preserved and can change # The order of elements in a set is not preserved and can change
set1 = {3, 1, 4, 1, 5, 9, 2, 2} set1 = {3, 1, 4, 1, 5, 9, 2, 2}

View File

@@ -24,7 +24,7 @@ z = 2 + 3j
print(type(z)) # <class 'complex'> print(type(z)) # <class 'complex'>
# str(Standard String) # str(Standard String)
single_qoutes = 'World' single_quotes = 'World'
double_quotes = "Hello" double_quotes = "Hello"
multiline = """This is multiline = """This is
a multi-line a multi-line