<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Format_Python</id>
	<title>Format Python - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://w.electrodragon.com/w/index.php?action=history&amp;feed=atom&amp;title=Format_Python"/>
	<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Format_Python&amp;action=history"/>
	<updated>2026-06-04T22:42:08Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.2</generator>
	<entry>
		<id>https://w.electrodragon.com/w/index.php?title=Format_Python&amp;diff=30797&amp;oldid=prev</id>
		<title>Chao: Created page with &quot;== Format == === String Format === &lt;syntaxhighlight lang=&quot;python&quot;&gt; print(&quot;I'm %s. I'm %d year old&quot; % ('Vamei', 99)) print ('this is %s %%') (% date) # %% to print % &lt;/syntaxhi...&quot;</title>
		<link rel="alternate" type="text/html" href="https://w.electrodragon.com/w/index.php?title=Format_Python&amp;diff=30797&amp;oldid=prev"/>
		<updated>2021-04-28T16:06:53Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;== Format == === String Format === &amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt; print(&amp;quot;I&amp;#039;m %s. I&amp;#039;m %d year old&amp;quot; % (&amp;#039;Vamei&amp;#039;, 99)) print (&amp;#039;this is %s %%&amp;#039;) (% date) # %% to print % &amp;lt;/syntaxhi...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Format ==&lt;br /&gt;
=== String Format ===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
print(&amp;quot;I'm %s. I'm %d year old&amp;quot; % ('Vamei', 99))&lt;br /&gt;
print ('this is %s %%') (% date) # %% to print %&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* s.strip() .lstrip() .rstrip(',') remove empty space, and special words&lt;br /&gt;
&lt;br /&gt;
=== Format type ===&lt;br /&gt;
* print type(aaa) # print type of aaa variable&lt;br /&gt;
* print len(aaa) # print length&lt;br /&gt;
&lt;br /&gt;
=== Change format ===&lt;br /&gt;
a = float(b) change to type float&lt;br /&gt;
=== Module String ===&lt;br /&gt;
==== Replace ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
import string&lt;br /&gt;
a = 'abcde'&lt;br /&gt;
b = string.replace(a, 'ab', '', 1)&lt;br /&gt;
print b&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category: Python]]&lt;/div&gt;</summary>
		<author><name>Chao</name></author>
	</entry>
</feed>