Computer Science, asked by ThisUsernamesTooLong, 1 month ago

Do not spam

str = "fun with Python"

a) str[:6:2]

b) str[-1:-8:-2]​

Answers

Answered by harshvirsing55
3

Answer:

a) str[:6:2]

\orange{\fbox{\tt O U T P U T :-}}

'fnw'

b) str[-1:-8:-2]​

\green{\fbox{\tt O U T P U T :-}}

'nhy '

\orange{\tt Hope it will} \green{\tt help you.}

Answered by allysia
3

Correcting it a bit to :  

a)

\tt print(str[:6:2])  

b)

\tt print(str[-1:-8:-2])

The output should be:

a) fnw

b) nhy

Similar questions