How do i reverse an input string with python in ROS
i want to convert an input collected from a topic and print out the reverse of it, eg Python-->nohtyP ive coded this in python txt = data[::-1] print(txt) where data comes from the topic, but i am thrown a Type error: 'string' object is not subscriptable. it seems the ROS library 'string' cannot be handled the same way as it is in python. are there any alternate methods to this?
Asked by blurzing on 2022-04-15 06:04:45 UTC
Comments