Hey Anthony,

Depends on what you are working.

Numpy offers where function or isclose function. Strings have the method
find or index. Dict offer keys and values which give a list back in which
you can search with the method index again.

A = ["adg",1,34,6,89,"srhlo"]
A.index(1)
>>> 1
A.index(2)
>>> Error not in list

A[0].index("d")
>>> 1

Hope this is what you are looking for
Best regards
Lukas

On Sat, 2 May 2020, 17:22 Anthony Ezeh, <[email protected]> wrote:

> is it possible to use something like the fetch funcion like in MATLAB to
> get a variable's value?
>
> --
> You received this message because you are subscribed to the Google Groups
> "spyder" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/spyderlib/e74b85e4-5ca5-4566-b56a-5a91bd1e9756%40googlegroups.com
> <https://groups.google.com/d/msgid/spyderlib/e74b85e4-5ca5-4566-b56a-5a91bd1e9756%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/spyderlib/CADHWJFOMefzZBsi3cKSDP%2BWEKqjYeZVDB2BrJsmv1pKBemTZXA%40mail.gmail.com.

Reply via email to