Mar-07-2019, 01:00 PM
hi,
i am reading a cvs which has column in which there is text written like,
new launch,ready to move,under construction
ready to move,under construction
ready to move,new launch,under construction
i want an order to be set for all . like below:
new launch, under construction, ready to move wherever these three elements are present.
and where these three elements are not present , then order should be :
under construction, new launch
how can i achieve this:
below is my code:
i am reading a cvs which has column in which there is text written like,
new launch,ready to move,under construction
ready to move,under construction
ready to move,new launch,under construction
i want an order to be set for all . like below:
new launch, under construction, ready to move wherever these three elements are present.
and where these three elements are not present , then order should be :
under construction, new launch
how can i achieve this:
below is my code:
1 2 3 |
possession = row[ 7 ].replace( "R" , "ready to move" ).replace( "N" , "new launch" ).replace( "UC" , "under construction" ) if "new launch" in possession: print (possession, ">>>" , possession.index( "new launch" )) ### dont know how to do it |