How to insert element at the beginning of list in Python -
i have 2 lists , first 1 having additional data (102) when compared second one.
first list:
['102 1 1 v-csm csm vcsm enabled active d:042 h:20 m:14 s:58 5.4.4.4-68.rel'] second list:
['2 1 v-csm csm vcsm enabled active d:331 h:12 m:20 s:33 5.4.4.4-68.rel'] i want insert string "xyz" @ first position of list using pandas data can mapped correct columns.
let's second list called array.
you can use array.insert(0, "xyz") or array = ["xyz"] + array add "xyz" beginning of second list.
Comments
Post a Comment