Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Added a python program
  • Loading branch information
AbhiBhalo committed Oct 1, 2019
commit 238aea4a31bdb2bc13f91e60678d01817f8ecc53
7 changes: 7 additions & 0 deletions array.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import array as arr
numbers_list = [2, 5, 62, 5, 42, 52, 48, 5]
numbers_array = arr.array('i', numbers_list)
print(numbers_array[2:5]) # 3rd to 5th
print(numbers_array[:-5]) # beginning to 4th
print(numbers_array[5:]) # 6th to end
print(numbers_array[:]) # beginning to end