This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chat_words_str = """ | |
AFAIK=As Far As I Know | |
AFK=Away From Keyboard | |
ASAP=As Soon As Possible | |
ATK=At The Keyboard | |
ATM=At The Moment | |
A3=Anytime, Anywhere, Anyplace | |
BAK=Back At Keyboard | |
BBL=Be Back Later | |
BBS=Be Back Soon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# string variable | |
str_var = "Name" | |
str_var1 = 'Name' | |
print(str_var) | |
print(type(str_var)) | |
print(str_var1) | |
print(type(str_var1)) | |
# Name | |
# <class 'str'> | |
# Name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Student: | |
# class variables | |
school_name = 'ABC School' | |
def __init__(self, name, age): | |
self.name = name | |
self.age = age | |
# instance method | |
def show(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set | |
var_set = {1, 2, 3, 4, 5} | |
print(var_set) | |
print(type(var_set)) | |
# {1, 2, 3, 4, 5} | |
# <class 'set'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Dictionary | |
var_dict = {'one':1, | |
'two':2} | |
print(var_dict) | |
print(type(var_dict)) | |
# {'one': 1, 'two': 2} | |
# <class 'dict'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Tuple | |
var_tuple = (1, 2, 3, 4, 5) | |
print(var_tuple) | |
print(type(var_tuple)) | |
# (1, 2, 3, 4, 5) | |
# <class 'tuple'> | |
var_tuple = (1, "Hello") | |
print(var_tuple) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## List | |
# | |
var_list = [1, 'Hi', 3.6, 12345678976543] | |
print(var_list) | |
print(type(var_list)) | |
# [1, 'Hi', 3.6, 12345678976543] | |
# <class 'list'> | |
var_list[0] = 2 | |
print(var_list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Boolean | |
var_bool = True | |
print(var_bool) | |
print(type(var_bool)) | |
# True | |
# <class 'bool'> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# String variable | |
str_var = "Name" | |
str_var1 = 'Name' | |
print(str_var) | |
print(type(str_var)) | |
print(str_var1) | |
print(type(str_var1)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Complex | |
cplx_var = 1 + 2j | |
print(cplx_var) | |
print(type(cplx_var)) | |
# (1+2j) | |
# <class 'complex'> | |
print(complex(2, 4)) | |
# (2+4j) |
NewerOlder