mirror of
https://github.com/autistic-symposium/master-algorithms-py.git
synced 2025-07-22 22:40:38 -04:00
Update playing_with_strings.py
This commit is contained in:
parent
a37d96b756
commit
e54535ae2b
1 changed files with 0 additions and 9 deletions
|
@ -3,13 +3,4 @@
|
||||||
# author: bt3gl
|
# author: bt3gl
|
||||||
|
|
||||||
def reverse_array_in_place(array):
|
def reverse_array_in_place(array):
|
||||||
""" Reverse an array in place """
|
|
||||||
return array[::-1]
|
return array[::-1]
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
|
|
||||||
print('Testing reverse_array_in_place')
|
|
||||||
array = [1, 2, 3, 4, 5]
|
|
||||||
print(f'Array: {array}')
|
|
||||||
print(f'Reversed: {reverse_array_in_place(array)}')
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue