Q5Numerical3 Marks1 Sep 2024
What is the output of the following snippet of code?
Code Snippet
given = '27{4517}90'
word = '' # empty string
index = 0
flag = False
```
given = '27{4517}90'
word = '' # empty string
index = 0
flag = False
while index < len(given):
char = given[index]
if char == '{':
flag = True
if flag and char not in '{}':
word += char
if char == '}':
break
index += 1
print(int(word))
```
Press Enter to check.