-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathimport.py
More file actions
56 lines (38 loc) · 805 Bytes
/
Copy pathimport.py
File metadata and controls
56 lines (38 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# for importing a another file as in yours.
# import is used and after that name of file to be import.
"""import model
model.name("vikrant")
# importing a list and printing a sepicifi value.
import model
a=model.student["age"]
b=model.student["class"]
print(a)
print(b)
# changing th file name as you want to import.
import model as ak
c=ak.name("vikrant")
"""
# default imoprt.
import platform
d=platform.system()
print(d)
e=dir(platform)
print(e)
"""
#for importing a sepicific type of data form another file.
from model import student
print(student["age"])
# for day time
import datetime
y=datetime.datetime.now()
print(y)
print(y.year)
print(y.month)
print(y.day)
# %A for day
print(y.strftime("%A"))
# %B for month
print(y.strftime("%B"))
# %c for date
print(y.strftime("%C"))
"""