Code returns error when not supposed to

A

amfr

This code always returns a ValueError when it is not supposed to:
i = rest.rfind('?')

Error:
ValueError: need more than 0 values to unpack

rfind is not supposed to generate an erro, just return -1. Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top