title: Efficient way to convert a list of one string to a string and perform split operation
body: <p>I have a list which contains a string shown below. I have defined <code>mylist</code> in the global space as a string using <code>""</code>.</p>
  
  <pre><code>mylist = ""
  mylist = ["1.22.43.45"]
  </code></pre>
  
  <p>I get an execution error stating that the split operation is not possible as it is being performed on a list rather than the string.</p>
  
  <p><code>mylist.rsplit(".",1)[-1]</code></p>
  
  <p>I tried to resolve it by using the following code:</p>
  
  <p><code>str(mylist.rsplit(".",1)[-1]</code></p>
  
  <p>Is this the best way to do it? The output I want is <code>45</code>. I am splitting the string and accessing the last element. Any help is appreciated.</p>