Oct-09-2017, 05:53 PM
The last two look right. The second looks unnecessary, could just be
As general advice on question asking when it comes to programming, if you can test it yourself in a few seconds then it's not a good question to ask on a forum. Your first conversion is easy to test and verify as incorrect (even after the syntax errors are fixed), since the type isn't even right. The latter three were good questions, after the second post. As a hint on the first one, you should follow a similar pattern of the last three, creating a list and appending to it, not just doing an assignment conditionally.
indices_to_delete = range(0, len(text), 250)
. The first one isn't right.As general advice on question asking when it comes to programming, if you can test it yourself in a few seconds then it's not a good question to ask on a forum. Your first conversion is easy to test and verify as incorrect (even after the syntax errors are fixed), since the type isn't even right. The latter three were good questions, after the second post. As a hint on the first one, you should follow a similar pattern of the last three, creating a list and appending to it, not just doing an assignment conditionally.