Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to change a particular text inside a list of dictionary

#how to remove special character inside a list containing dictionary values.
list_of_dictionary=[{"text":"$%&yahoo","zoombie":"you"},{"text":"i am zain%%%","greeting":"hello"}]
for i,j in enumerate(list_of_dictionary):
   text=j['text']
   text_1 =re.sub('W+', ' ',text)
   list_of_dictionary[i]['text']=text_1
print(list_of_text)
Comment

PREVIOUS NEXT
Code Example
Python :: discord.py custom status 
Python :: successful=true for number in range (3) print ("Attempt") if successful: print ("Successful") breal 
Python :: ping all ip addresses in a network 
Python :: cx_freeze include images in specific path 
Python :: unbreakable box made of diamond 
Python :: how to convert a axis label to non scientific notation in matploltlib 
Python :: Kinesis Client get_records response json 
Python :: numpy.where() for substring 
Python :: locate certs path for python 
Python :: how to register button presses in pysimpleGUI 
Python :: semaphore example in python 
Python :: pyglet on close 
Python :: python capitilize 
Python :: import nifti to numpy 
Python :: =adaqtar 
Python :: how to play mp3 file form pygame module 
Python :: pytorch_starting 
Python :: pandas plot column titles vertical 
Python :: python image resize 
Python :: how to make a config txt file on python 
Python :: django graphene without model 
Python :: relation api profile does not exist django 
Python :: saving data in python 
Python :: python allow null argument 
Python :: python warshall algorithm stackoverflow 
Python :: python send commands in one line but write in multiple 
Python :: print the list item dtype 
Python :: if python 
Python :: run python in background ubuntu 
Python :: print list vertically python 
ADD CONTENT
Topic
Content
Source link
Name
2+7 =