bob = """<p>The <b>Battle of Midway</b> <span style="font-weight: normal">(<span class="t_nihongo_kanji" lang="ja" xml:lang="ja">ミッドウェー海戦</span><span class="t_nihongo_comma" style="display:none">,</span> <i>Middowē Kaisen</i><span class="t_nihongo_help noprint"><sup><a href="/wiki/Help:Installing_Japanese_character_sets" title="Help:Installing Japanese character sets"><span class="t_nihongo_icon" style="color: #00e; font: bold 80% sans-serif; text-decoration: none; padding: 0 .1em;">?</span></a></sup></span>)</span> was the most important naval battle of the <a href="/wiki/Pacific_Theater_of_Operations" title="Pacific Theater of Operations">Pacific Campaign</a> of <a href="/wiki/World_War_II" title="World War II">World War II</a>.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span>[</span>5<span>]</span></a></sup><sup id="cite_ref-6" class="reference"><a href="#cite_note-6"><span>[</span>6<span>]</span></a></sup><sup id="cite_ref-Midway_Decisive_7-0" class="reference"><a href="#cite_note-Midway_Decisive-7"><span>[</span>7<span>]</span></a></sup> Between 4 and 7 June 1942, only six months after <a href="/wiki/Empire_of_Japan" title="Empire of Japan">Japan</a>'s <a href="/wiki/Attack_on_Pearl_Harbor" title="Attack on Pearl Harbor">attack on Pearl Harbor</a>, and one month after the <a href="/wiki/Battle_of_the_Coral_Sea" title="Battle of the Coral Sea">Battle of the Coral Sea</a>, the <a href="/wiki/United_States_Navy" title="United States Navy">United States Navy</a> decisively defeated an <a href="/wiki/Imperial_Japanese_Navy" title="Imperial Japanese Navy">Imperial Japanese Navy</a> (IJN) attack against <a href="/wiki/Midway_Atoll" title="Midway Atoll">Midway Atoll</a>, inflicting irreparable damage on the Japanese fleet.<sup id="cite_ref-U.S_8-0" class="reference"><a href="#cite_note-U.S-8"><span>[</span>8<span>]</span></a></sup> Military historian <a href="/wiki/John_Keegan" title="John Keegan">John Keegan</a> called it "the most stunning and decisive blow in the history of naval warfare."<sup id="cite_ref-9" class="reference"><a href="#cite_note-9"><span>[</span>9<span>]</span></a></sup></p>""" bob = bob.replace("<\b>",'').split() for item in bob: if "<" in item or ">" or "href=" in item or "style=" in item or "class=" in item: bob.remove(item) tom = " ".join(bob) print(tom)
Run
Reset
Share
Import
Link
Embed
Language▼
English
中文
Python Fiddle
Python Cloud IDE
Follow @python_fiddle
Browser Version Not Supported
Due to Python Fiddle's reliance on advanced JavaScript techniques, older browsers might have problems running it correctly. Please download the latest version of your favourite browser.
Chrome 10+
Firefox 4+
Safari 5+
IE 10+
Let me try anyway!
url:
Go
Python Snippet
Stackoverflow Question