what does [::-1] mean in python
list[<start>:<stop>:<step>]
So, when you do MyList[::-1], its starts from the end towards the begining taking each element by a step of 1 (hence -1). So, its reversing the list. Applicable to tuples as well
what does [::-1] mean in python
list[<start>:<stop>:<step>]
So, when you do MyList[::-1], its starts from the end towards the begining taking each element by a step of 1 (hence -1). So, its reversing the list. Applicable to tuples as well
mean python
import numpy as np
values=[1,10,100]
print(np.mean(values))
values=[1,10,100,np.nan]
print(np.nanmean(values))
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us