mirror of
https://github.com/Asabeneh/30-Days-Of-Python.git
synced 2026-06-03 21:02:42 +08:00
41 lines
1020 B
Python
41 lines
1020 B
Python
|
|
# Variables in Python
|
|
|
|
first_name = 'Asabeneh'
|
|
last_name = 'Yetayeh'
|
|
country = 'Finland'
|
|
city = 'Helsinki'
|
|
age = 250
|
|
is_married = True
|
|
skills = ['HTML', 'CSS', 'JS', 'React', 'Python']
|
|
person_info = {
|
|
'firstname': 'Asabeneh',
|
|
'lastname': 'Yetayeh',
|
|
'country': 'Finland',
|
|
'city': 'Helsinki'
|
|
}
|
|
|
|
# Printing the values stored in the variables
|
|
|
|
print('First name:', first_name)
|
|
print('First name length:', len(first_name))
|
|
print('Last name: ', last_name)
|
|
print('Last name length: ', len(last_name))
|
|
print('Country: ', country)
|
|
print('City: ', city)
|
|
print('Age: ', age)
|
|
print('Married: ', is_married)
|
|
print('Skills: ', skills)
|
|
print('Person information: ', person_info)
|
|
|
|
# Declaring multiple variables in one line
|
|
|
|
first_name, last_name, country, age, is_married = 'Asabeneh', 'Yetayeh', 'Helsink', 250, True
|
|
|
|
print(first_name, last_name, country, age, is_married)
|
|
print('First name:', first_name)
|
|
print('Last name: ', last_name)
|
|
print('Country: ', country)
|
|
print('Age: ', age)
|
|
print('Married: ', is_married)
|