August 2021
Beginner to intermediate
112 pages
1h 29m
English
| Puzzle 19 | Holding out for a Hero |
| | import pandas as pd |
| | |
| | heros = pd.Series(['Batman', 'Wonder Woman', 'Superman']) |
| | if heros.str.find('Iron Man').any(): |
| | print('Wrong universe') |
| | else: |
| | print('DC') |
Guess the Output | |
|---|---|
|
|
Try to guess what the output is before moving to the next page. |
This code will print: Wrong universe
The str.find documentation says the following:
Return the lowest index in the string where substring ...
Read now
Unlock full access