FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
tutorials/core-python/Core_Python/arraypkg/ArrayDemo.py at master · deepdalsania/tutorials · GitHub
deepdalsania
/
tutorials
Public
Notifications
You must be signed in to change notification settings
Fork
7
Star
8
Code
Issues
0
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
tutorials
/
core-python
/
Core_Python
/
arraypkg
/
ArrayDemo.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
64 lines (42 loc) · 1.06 KB
Breadcrumbs
tutorials
/
core-python
/
Core_Python
/
arraypkg
/
ArrayDemo.py
Copy path
File metadata and controls
64 lines (42 loc) · 1.06 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
'''import array as arr
arr.array()'''
from
array
import
*
from
math
import
*
# val = array('i',[1,2,3,4,5]) # for unsigned I
# print(val)
# address , siz of array
# print(val.buffer_info())
# reverse
'''val.reverse()
print(val)'''
'''for i in val:
print(i)'''
# character
'''val = array('u',['a','e','i','o','u'])
for i in val:
print(i)'''
# long
'''val = array('l',[151313136,212321512,541325454]) # for unsigned L
for i in val:
print(i)'''
# float
'''val = array('f',[151.2115,2123.21512,5413.25454]) # for unsigned F
for i in val:
print(i)'''
'''val = array('i',[1,2,3,4,5])
newArr = array(val.typecode , (a for a in val))
for i in newArr:
print(i)'''
'''val = array('i',[1,2,3,4,5])
newArr = array(val.typecode , (a*a for a in val))
for i in newArr:
print(i)'''
'''val = array('i',[1,2,3,4,5])
newArr = array(val.typecode , (a for a in val))
i = 0
while i < len(newArr):
print(newArr[i])
i+=1'''
# sorting array using math sorted function
'''val = array('i',[1,34,5,32,343,43,432343,32423,232,3,432])
print(sorted(val))'''
Back
|
FazBrowse Home
|
New Git URL