Skip to content
Navigation Menu
{{ message }}
forked from devsonket/devsonket.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
1 lines (1 loc) · 29.7 KB
/
Copy pathindex.html
File metadata and controls
1 lines (1 loc) · 29.7 KB
1
<!DOCTYPE html><html lang="bn"><head><meta charSet="utf-8"/><meta http-equiv="x-ua-compatible" content="ie=edge"/><meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"/><style data-href="/styles.f73fe85f2d257fe70764.css">html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{margin:0;max-width:100%;background-color:#fff;font-family:Kalpurush,Arial,sans-serif;color-adjust:exact;-webkit-print-color-adjust:exact}*{box-sizing:border-box}:after,:before{box-sizing:inherit}@font-face{font-family:Kalpurush;src:local("Kalpurush.eot"),url(/static/Kalpurush-1fa8c68dbc2271be80107d46e7567971.eot);src:local("Kalpurush.woff"),url(/static/Kalpurush-7268d6d360d4ec731abaea2f93deb19d.woff) format("woff"),local("Kalpurush.ttf"),url(/static/Kalpurush-797849bb979d05a914f3b88666c78c22.ttf) format("truetype"),local("Kalpurush.svg"),url(/static/Kalpurush-ffe190e439853382157b6553806dd1f5.svg#Kalpurush) format("svg"),local("Kalpurush.eot"),url(/static/Kalpurush-1fa8c68dbc2271be80107d46e7567971.eot?#iefix) format("embedded-opentype");font-style:normal;font-weight:400}article,aside,details,figcaption,figure,footer,header,main,menu,nav,section,summary{display:block}audio,canvas,progress,video{display:inline-block}audio:not([controls]){display:none;height:0}progress{vertical-align:baseline}[hidden],template{display:none}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:inherit;font-weight:bolder}dfn{font-style:italic}h1{font-size:2em;margin:.67em 0}mark{background-color:#ff0;color:#000}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}svg:not(:root){overflow:hidden}code,kbd,pre,samp{font-family:monospace,monospace;font-size:1em}figure{margin:1em 40px}hr{box-sizing:content-box;height:0;overflow:visible}button,input,optgroup,select,textarea{font:inherit;margin:0}optgroup{font-weight:700}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-input-placeholder{color:inherit;opacity:.54}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}img{max-width:100%;padding:0;margin:0 0 1.45rem}h1{font-size:2.25rem}h1,h2{padding:0;margin:0 0 1.45rem;color:inherit;font-weight:700;text-rendering:optimizeLegibility;line-height:1.1}h2{font-size:1.62671rem}h3{font-size:1.38316rem}h3,h4{padding:0;margin:0 0 1.45rem;color:inherit;font-weight:700;text-rendering:optimizeLegibility;line-height:1.1}h4{font-size:1rem}h5{font-size:.85028rem}h5,h6{padding:0;margin:0 0 1.45rem;color:inherit;font-weight:700;text-rendering:optimizeLegibility;line-height:1.1}h6{font-size:.78405rem}hgroup{padding:0;margin:0 0 1.45rem}ul{margin-right:0;margin-top:0;margin-bottom:0}ol,ul{padding:0;list-style-position:outside;list-style-image:none}ol{margin:0 0 1.45rem 1.45rem}dd,dl,figure,p{padding:0;margin:0 0 1.45rem}pre{margin:0 0 1.45rem;font-size:.85rem;line-height:1.42;background:rgba(0,0,0,.04);border-radius:3px;overflow:auto;word-wrap:normal;padding:1.45rem}table{font-size:1rem;line-height:1.45rem;border-collapse:collapse;width:100%}fieldset,table{padding:0;margin:0 0 1.45rem}blockquote{padding:0;margin:0 1.45rem 1.45rem}form,iframe,noscript{padding:0;margin:0 0 1.45rem}hr{padding:0;margin:0 0 calc(1.45rem - 1px);background:rgba(0,0,0,.2);border:none;height:1px}address{padding:0;margin:0 0 1.45rem}b,dt,strong,th{font-weight:700}ol li,ul li{padding-left:0}li>ol,li>ul{margin-left:1.45rem;margin-bottom:.725rem;margin-top:.725rem}blockquote :last-child,li :last-child,p :last-child{margin-bottom:0}li>p{margin-bottom:.725rem}code,kbd,samp{font-size:.85rem;line-height:1.45rem}abbr,abbr[title],acronym{border-bottom:1px dotted rgba(0,0,0,.5);cursor:help}abbr[title]{text-decoration:none}td,th,thead{text-align:left}td,th{border-bottom:1px solid rgba(0,0,0,.12);font-feature-settings:"tnum";-moz-font-feature-settings:"tnum";-ms-font-feature-settings:"tnum";-webkit-font-feature-settings:"tnum";padding:.725rem .96667rem calc(.725rem - 1px)}td:first-child,th:first-child{padding-left:0}td:last-child,th:last-child{padding-right:0}code,tt{background-color:#eee;display:inline-block;border-radius:4px;font-family:SFMono-Regular,Consolas,Roboto Mono,Droid Sans Mono,Liberation Mono,Menlo,Courier,monospace;padding:5px 10px}pre code{line-height:1.42;white-space:pre-wrap}code:after,code:before,tt:after,tt:before{letter-spacing:-.2em;content:" "}pre code:after,pre code:before,pre tt:after,pre tt:before{content:""}@media only screen and (max-width:480px){html{font-size:100%}}.mt-0{margin-top:-50px}@page{size:A4;margin:25px;padding:0}@page :header{color:#fff}@media print{body,html{width:210mm;height:297mm}}</style><meta name="generator" content="Gatsby 2.8.1"/><title data-react-helmet="true">পাইথন ৩ চিটশিট | ডেভ সংকেত</title><meta data-react-helmet="true" name="description" content="পাইথন ৩ প্রোগ্রামিং এর চিটশিট"/><meta data-react-helmet="true" property="og:title" content="পাইথন ৩ চিটশিট"/><meta data-react-helmet="true" property="og:description" content="পাইথন ৩ প্রোগ্রামিং এর চিটশিট"/><meta data-react-helmet="true" property="og:type" content="website"/><meta data-react-helmet="true" property="og:image" content="/static/thumbnail-2343302045de503bc793f30494dd245e.png"/><meta data-react-helmet="true" property="og:image:secure_url" content="/static/thumbnail-2343302045de503bc793f30494dd245e.png"/><meta data-react-helmet="true" property="og:image:width" content="1200"/><meta data-react-helmet="true" property="og:image:height" content="675"/><meta data-react-helmet="true" name="twitter:card" content="summary"/><meta data-react-helmet="true" name="twitter:creator" content="devsonket"/><meta data-react-helmet="true" name="twitter:title" content="পাইথন ৩ চিটশিট"/><meta data-react-helmet="true" name="twitter:description" content="পাইথন ৩ প্রোগ্রামিং এর চিটশিট"/><link rel="shortcut icon" href="/icons/icon-48x48.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="manifest" href="/manifest.webmanifest"/><meta name="theme-color" content="#333"/><link rel="apple-touch-icon" sizes="48x48" href="/icons/icon-48x48.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="72x72" href="/icons/icon-72x72.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="96x96" href="/icons/icon-96x96.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="144x144" href="/icons/icon-144x144.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="192x192" href="/icons/icon-192x192.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="256x256" href="/icons/icon-256x256.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="384x384" href="/icons/icon-384x384.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="apple-touch-icon" sizes="512x512" href="/icons/icon-512x512.png?v=9eed5a0b39c100e928b6d90aae3b45dc"/><link rel="sitemap" type="application/xml" href="/sitemap.xml"/><link as="script" rel="preload" href="/component---src-templates-cheatsheet-js-c05e456a705f6c4b4f2e.js"/><link as="script" rel="preload" href="/app-8edac72460a1255540d0.js"/><link as="script" rel="preload" href="/styles-a3b7e19ee8b28c84a71b.js"/><link as="script" rel="preload" href="/3-f0e72b64e0b3f1a42116.js"/><link as="script" rel="preload" href="/2-3c9e0141850a29903c41.js"/><link as="script" rel="preload" href="/1-209954670220ae58f266.js"/><link as="script" rel="preload" href="/webpack-runtime-73b22198aa612a34ce61.js"/><link as="fetch" rel="preload" href="/static/d/12/path---python-3-cheat-sheet-d-1-b-ede-CGZAPVbF77cs2MWxlcgsqB7miY.json" crossorigin="use-credentials"/></head><body><noscript id="gatsby-noscript">This app works best with JavaScript enabled.</noscript><div id="___gatsby"><div style="outline:none" tabindex="-1" role="group"><div><style data-emotion-css="ienoz">.css-ienoz{background-color:#f8f9fa;}.css-ienoz .contributor{list-style:none;margin-bottom:15px;}.css-ienoz .contributor p{margin-bottom:10px;font-weight:900;}.css-ienoz .contributor li{display:inline-block;position:relative;margin:0 5px;}.css-ienoz .contributor-profile span{position:absolute;bottom:5px;right:-2px;font-weight:bold;background-color:#4caf50;color:#fff;font-size:11px;width:15px;height:15px;line-height:15px;border-radius:40px;}.css-ienoz .contributor-profile img{width:40px;border-radius:40px;border:3px solid #ffc107;}</style><header class="css-ienoz"><style data-emotion-css="bi8mfp">.css-bi8mfp{list-style:none;margin:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0px 30px;background:white;height:60px;box-shadow:0 1px 2px 0 rgba(60,64,67,0.3), 0 2px 6px 2px rgba(60,64,67,0.15);}@media (max-width:459px){.css-bi8mfp{padding:0px 10px;}}@media print{.css-bi8mfp{box-shadow:none;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}}.css-bi8mfp ul li{display:inline-block;}</style><nav class="css-bi8mfp"><style data-emotion-css="h39w2a">.css-h39w2a{-webkit-text-decoration:none;text-decoration:none;font-size:26px;color:#333;}@media only screen and (max-width:460px){.css-h39w2a{display:block;text-align:center;}}.css-h39w2a span{background-color:#333;color:#fff;padding:0 8px;border-radius:4px;margin-right:5px;}</style><a href="/" class="css-h39w2a"><span>ডেভ</span>সংকেত</a><span class="css-0"><style data-emotion-css="1gbpt2e">.css-1gbpt2e{-webkit-text-decoration:none;text-decoration:none;display:inline-block;padding:8px 18px;border-radius:4px;cursor:pointer;font-weight:600;line-height:1;-webkit-transition:0.2s all ease;transition:0.2s all ease;background:#02b3e4;box-shadow:8px 10px 20px 0 rgba(46,61,73,0.15);color:white;text-shadow:0 1px 3px #86888e;}@media print{.css-1gbpt2e{display:none;}}.css-1gbpt2e:hover{box-shadow:2px 4px 8px 0 rgba(46,61,73,0.2);background-color:#02b7e9;}</style><a target="self" rel="" style="background-color:#02b3e4" href="https://github.com/devsonket/devsonket.github.io#%E0%A6%95%E0%A6%BF%E0%A6%AD%E0%A6%BE%E0%A6%AC%E0%A7%87-%E0%A6%95%E0%A6%BE%E0%A6%9C-%E0%A6%95%E0%A6%B0%E0%A7%87" class="css-1gbpt2e">+ কন্ট্রিবিউট করুন</a></span></nav><style data-emotion-css="c0wvpn">.css-c0wvpn{width:940px;margin:80px auto 0 auto;}@media only screen and (max-width:940px){.css-c0wvpn{width:100%;}}</style><div class="css-c0wvpn"><div class="css-c0wvpn"><style data-emotion-css="apfmfo">.css-apfmfo{padding:0 50px;text-align:center;padding-bottom:100px;}@media only screen and (max-width:460px){.css-apfmfo{padding:0 15px;padding-bottom:15px;}}@media print{.css-apfmfo{padding-bottom:0px;}}.css-apfmfo input{width:100%;border:none;padding:15px;border-radius:4px;box-shadow:0 6px 8px rgba(102,119,136,0.03), 0 1px 2px rgba(102,119,136,0.3);-webkit-transition:0.2s all ease;transition:0.2s all ease;}.css-apfmfo input:focus{outline:none;box-shadow:0 0 0 4px #d6dcdb;}.css-apfmfo p{margin-top:0px;color:#485663;font-size:15px;}</style><div class="css-apfmfo"><h1>পাইথন ৩ চিটশিট</h1><p>পাইথন ৩ প্রোগ্রামিং এর চিটশিট</p><div class="print no-print"><span class="css-0"><a target="_blank" rel="noreferrer noopener" style="background-color:#02b3e4" href="/print/python3-cheat-sheet" class="css-1gbpt2e">প্রিন্ট করুন</a></span></div></div></div></div></header><style data-emotion-css="1rqncur">.css-1rqncur{max-width:940px;margin:0 auto;padding:50px 0;}@media only screen and (max-width:940px){.css-1rqncur{width:100%;}}@media only screen and (max-width:460px){.css-1rqncur{padding:25px 0;}}</style><section class="css-1rqncur"><style data-emotion-css="nr0220">.css-nr0220{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-flow:row wrap;-ms-flex-flow:row wrap;flex-flow:row wrap;}.css-nr0220 > div{margin:15px;-webkit-flex:1 1 calc(50% - 30px);-ms-flex:1 1 calc(50% - 30px);flex:1 1 calc(50% - 30px);}@media print{.css-nr0220 > div{margin:15px 50px;}}@media only screen and (max-width:668px){.css-nr0220 > div{-webkit-flex-basis:calc(100% - 20px);-ms-flex-preferred-size:calc(100% - 20px);flex-basis:calc(100% - 20px);margin:0 10px;margin-bottom:15px;}}@media print{.css-nr0220 > div{-webkit-flex-basis:100%;-ms-flex-preferred-size:100%;flex-basis:100%;}}</style><div class="css-nr0220"><style data-emotion-css="k5s2x8">.css-k5s2x8 h3{font-size:18px;margin-bottom:15px;color:rgba(0,0,0,0.5);}@media print{.css-k5s2x8 h3{color:#000;}}.css-k5s2x8:hover a{opacity:1;}.css-k5s2x8 .single-item{background-color:#fff;padding:25px;border-radius:4px;box-shadow:0 6px 8px rgba(0,0,0,0.03),0 1px 2px rgba(0,0,0,0.3);}@media print{.css-k5s2x8 .single-item{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;padding:0;box-shadow:none;}}.css-k5s2x8 .single-item .item{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:15px;border-bottom:1px solid #e0e0e0;padding-bottom:15px;}@media print{.css-k5s2x8 .single-item .item{margin:0 5px;padding-bottom:0px;-webkit-flex:2 2 calc(50% - 10px);-ms-flex:2 2 calc(50% - 10px);flex:2 2 calc(50% - 10px);border:none;}}.css-k5s2x8 .single-item .item:last-child{margin-bottom:0;border-bottom:none;}.css-k5s2x8 .single-item .def{-webkit-flex:1 1 50%;-ms-flex:1 1 50%;flex:1 1 50%;padding:5px;}.css-k5s2x8 .single-item .def a{color:#000;}.css-k5s2x8 .single-item .code,.css-k5s2x8 .single-item p{margin-bottom:0;}.css-k5s2x8 .single-item pre{padding:5px;background-color:transparent;color:#1565c0;}@media only screen and (max-width:940px){.css-k5s2x8 pre.code{overflow-y:hidden;white-space:pre-wrap;overflow:hidden;word-wrap:break-word;}}</style><div id="1" class="css-k5s2x8"><style data-emotion-css="qke808">.css-qke808{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;}.css-qke808 a{-webkit-text-decoration:none;text-decoration:none;background:#00000080;color:#fff;font-weight:900;text-transform:uppercase;font-size:13px;padding:1px 10px;border-radius:4px;margin-bottom:15px;opacity:0;}</style><div class="sheet-title css-qke808"><h3>বেইস টাইপস (Base Types)</h3><a href="/python3-cheat-sheet/#1">Link</a></div><ul class="single-item"><li class="item"><p class="def">পূর্ণ সংখ্যা</p><pre class="code"><code>int উদাহরণ: 234, 0, -193, 0b010, 0xF3</code></pre></li><li class="item"><p class="def">ফ্লোটিং পয়েন্ট সংখ্যা</p><pre class="code"><code>float উদাহরণ: 9.23, 0.0, -1.7e-6</code></pre></li><li class="item"><p class="def">বুলিয়ান</p><pre class="code"><code>bool উদাহরণ: True, False</code></pre></li><li class="item"><p class="def">স্ট্রিং অথবা অক্ষর</p><pre class="code"><code>str উদাহরণ: 'hello', "world"</code></pre></li><li class="item"><p class="def">বাইটস</p><pre class="code"><code>bytes উদাহরণ: b'toto\xfe\775'</code></pre></li></ul></div><div id="2" class="css-k5s2x8"><div class="sheet-title css-qke808"><h3>কনটেইনার টাইপস (Container Types)</h3><a href="/python3-cheat-sheet/#2">Link</a></div><ul class="single-item"><li class="item"><p class="def">লিস্ট</p><pre class="code"><code>list উদাহরণ: [1, 2, 3], ['x', 22, -3, 2]</code></pre></li><li class="item"><p class="def">ডিকশনারি</p><pre class="code"><code>dict উদাহরণ: {'one': 1, 'two': 2}</code></pre></li><li class="item"><p class="def">টুপল (ইমিউটেবল বা অপরিবর্তনযোগ্য ডেটা টাইপ)</p><pre class="code"><code>tuple উদাহরণ: (1, 2, 'x',)</code></pre></li><li class="item"><p class="def">সেট</p><pre class="code"><code>set উদাহরণ: {1, 2, 'y'}</code></pre></li></ul></div><div id="3" class="css-k5s2x8"><div class="sheet-title css-qke808"><h3>ভ্যারিয়েবল এসাইনমেন্ট (Variable Assginment)</h3><a href="/python3-cheat-sheet/#3">Link</a></div><ul class="single-item"><li class="item"><p class="def">এখানে x হলো ভ্যারিয়েবল এবং সমান চিহ্নের ডান পাশে রয়েছে কম্পিউটেড এক্সপ্রেশন অথবা ভ্যালু</p><pre class="code"><code>x = 1.2 + 8 + sin(0)</code></pre></li><li class="item"><p class="def">একাধিক ভ্যারিয়েবল এসাইনমেন্টঃ ডানপাশে ভ্যারিয়েবল সমূহ এবং বাম পাশে কমা দ্বারা বিভক্ত এদের ভ্যালু সমূহ ক্রমান্বয়ে সজ্জিত</p><pre class="code"><code>y, z, r = 9.2, -7.6, 'bad'</code></pre></li><li class="item"><p class="def">Increment: ইনক্রিমেন্ট</p><pre class="code"><code>x += 3 (or x = x + 3)</code></pre></li><li class="item"><p class="def">Decrement: ডিক্রিমেন্ট</p><pre class="code"><code>x -= 3 (or x = x + 3)</code></pre></li></ul></div><div id="4" class="css-k5s2x8"><div class="sheet-title css-qke808"><h3>টাইপ কনভারসন (Type Conversion)</h3><a href="/python3-cheat-sheet/#4">Link</a></div><ul class="single-item"><li class="item"><p class="def">স্ট্রিং কে int নাম্বারে পরিবর্তন</p><pre class="code"><code>int('15') → 15</code></pre></li><li class="item"><p class="def">int নাম্বারের পরিবর্তনের ক্ষেত্রে বেইস এর ব্যবহার: উদাহরন ১ ও ২ এ যথাক্রমে বেইস ১৬ এবং বেইস ১০ ব্যবহার করা হয়েছে</p><pre class="code"><code>উদাহরণ ১: int('3f', 16) → 63 উদাহরণ ২: int('123', 10) → 123</code></pre></li><li class="item"><p class="def">দশমিকের পরের অংশের কর্তন</p><pre class="code"><code>int(15.56) → 15</code></pre></li><li class="item"><p class="def">float নাম্বারে পরিবর্তন</p><pre class="code"><code>float('-11.24e8') → -1124000000.0</code></pre></li><li class="item"><p class="def">round এর মাধ্যমে একটি দশমিক ভগ্নাশের দশমিকের পরের অংশের নম্বরের সংখ্যা কমিয়ে আনা হয়</p><pre class="code"><code>round(15.56, 1) → 15.6</code></pre></li><li class="item"><p class="def">বুলিয়ানে পরিবর্তন</p><pre class="code"><code>bool(x) → উত্তর False হবে যদি x এর মান None অথবা '' (শূন্য স্ট্রিং) হয়, True হবে x এর অন্যান্য মান এর জন্যে</code></pre></li><li class="item"><p class="def">স্ট্রিং এ পরিবর্তন</p><pre class="code"><code>str(x) → '...' এখানের x এর যেকোন ভ্যালু স্ট্রিং এ রূপান্তরিত হবে</code></pre></li><li class="item"><p class="def">ক্যারাক্টার বা chr এ পরিবর্তন</p><pre class="code"><code>chr(64) → '@' এখানে পূর্ণ সংখ্যাটি (64) হলো ইউনিকোডে রূপান্তরিত ক্যারাক্টারের (@) অবস্থানের ক্রম। আরেকটি উদাহরনঃ ইউনিকোডে a এর অবস্থান ৬৫ পয়েন্টে।</code></pre></li><li class="item"><p class="def">বাইটস বা bytes এ পরিবর্তন</p><pre class="code"><code>bytes([72,9,64]) → b'H @' এখানে একটি লিস্টকে বাইটসে রূপান্তরিত করা হয়েছে।</code></pre></li><li class="item"><p class="def">স্ট্রিং(str) কে লিস্টে(list) পরিবর্তন</p><pre class="code"><code>list('abc') → ['a','b','c']</code></pre></li><li class="item"><p class="def">ডিকশনারিতে (dict) এ পরিবর্তন</p><pre class="code"><code>dict([(3, 'three'),(1, 'one')]) → {1: 'one', 3: 'three'}</code></pre></li><li class="item"><p class="def">সেট (set) এ পরিবর্তন</p><pre class="code"><code>set(['one', 'two']) → {'one', 'two'}</code></pre></li></ul></div><div id="5" class="css-k5s2x8"><div class="sheet-title css-qke808"><h3>মড্যুল এবং নেইম ইমপোর্ট (Module and Name import)</h3><a href="/python3-cheat-sheet/#5">Link</a></div><ul class="single-item"><li class="item"><p class="def">as এর ব্যবহার করে সরাসরি names এর এক্সেস</p><pre class="code"><code>from monmod import nom1, nom2 as fct</code></pre></li><li class="item"><p class="def">মড্যুল এক্সেস এর অন্য উপায় হতে পারে monmod.nom1</p><pre class="code"><code>import monmod</code></pre></li></ul></div><div id="6" class="css-k5s2x8"><div class="sheet-title css-qke808"><h3>পান্ডাস ডাটাফ্রাম (Pandas Dataframe)</h3><a href="/python3-cheat-sheet/#6">Link</a></div><ul class="single-item"><li class="item"><p class="def">পান্ডাস ইম্পোর্ট করা</p><pre class="code"><code>import pandas as pd</code></pre></li><li class="item"><p class="def">সিএসভি ফাইল রিড করা এবং ভেরিয়েবলে রাখা</p><pre class="code"><code>df = pd.read_csv(file_path)</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের রো, কলাম সংখ্যা</p><pre class="code"><code>df.shape</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের ইন্ডেক্স(রো লেবেল)</p><pre class="code"><code>df.index</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের সব কলামের নাম</p><pre class="code"><code>df.columns</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের প্রথম n রো</p><pre class="code"><code>df.head(n)</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের শেষের n রো</p><pre class="code"><code>df.tail(n)</code></pre></li><li class="item"><p class="def">র্যান্ডমলি ডাটাফ্রেমের ৯ টি রো সিলেক্ট করে</p><pre class="code"><code>df.sample(n=9)</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের ইনফো</p><pre class="code"><code>df.info()</code></pre></li><li class="item"><p class="def">পুরো ডাটাফ্রেমের সামারি পরিসংখ্যান</p><pre class="code"><code>df.describe()</code></pre></li><li class="item"><p class="def">নিউমেরিক কলামগুলোর গড়</p><pre class="code"><code>df.mean()</code></pre></li><li class="item"><p class="def">নিউমেরিক কলামগুলোর মিডিয়ান</p><pre class="code"><code>df.median()</code></pre></li><li class="item"><p class="def">কোন একটি ফাংশন এপ্লাই করা</p><pre class="code"><code>df.apply(func)</code></pre></li><li class="item"><p class="def">ভ্যালু অনুযায়ী সোর্ট করা</p><pre class="code"><code>df.sort_values(by='column_name')</code></pre></li><li class="item"><p class="def">কলামের ভ্যালুগুলোর ফ্রিকুয়েন্সি</p><pre class="code"><code>df['column_name'].value_counts()</code></pre></li><li class="item"><p class="def">ডাটাফ্রেমের ইন্ডেক্স সোর্ট করে।</p><pre class="code"><code>df.sort_index()</code></pre></li><li class="item"><p class="def">কলামের ইউনিক ভ্যালুর সংখ্যা</p><pre class="code"><code>df['column_name'].nunique()</code></pre></li><li class="item"><p class="def">NA/null মান রয়েছে এমন কলাম বাদ দেয়া</p><pre class="code"><code>df.dpropna()</code></pre></li><li class="item"><p class="def">NA/null ভ্যালু এর মান value-এ পরিবর্তন করা</p><pre class="code"><code>df.fillna(value)</code></pre></li><li class="item"><p class="def">কলামের নাম পরিবর্তন করা।</p><pre class="code"><code>df.rename(columns = {'old_name': 'new_name'})</code></pre></li></ul></div></div></section><style data-emotion-css="h7cpsb">.css-h7cpsb{background-color:#eee;text-align:center;}@media print{.css-h7cpsb{visibility:hidden;}}.css-h7cpsb ul{list-style:none;margin-bottom:10px;}.css-h7cpsb ul li{display:inline-block;margin:0 5px;}.css-h7cpsb ul li a{background:#333;color:#fff;-webkit-text-decoration:none;text-decoration:none;padding:2px 10px;font-weight:900;text-transform:uppercase;border-radius:4px;font-size:13px;}</style><footer class="css-h7cpsb"><style data-emotion-css="1rqncur">.css-1rqncur{max-width:940px;margin:0 auto;padding:50px 0;}@media only screen and (max-width:940px){.css-1rqncur{width:100%;}}@media only screen and (max-width:460px){.css-1rqncur{padding:25px 0;}}</style><section class="css-1rqncur"><ul><li><a target="_blank" rel="noopener noreferrer" class="github-button" href="https://github.com/devsonket/devsonket.github.io">Star</a></li><li><a target="_blank" rel="noopener noreferrer" class="github-button" href="https://github.com/devsonket/devsonket.github.io/subscription">Watch</a></li><li><a target="_blank" rel="noopener noreferrer" class="github-button" href="https://github.com/devsonket/devsonket.github.io/issues/new?title=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE&body=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE%20%E0%A6%AC%E0%A6%BF%E0%A6%B8%E0%A7%8D%E0%A6%A4%E0%A6%BE%E0%A6%B0%E0%A6%BF%E0%A6%A4&labels=%E0%A6%B8%E0%A6%AE%E0%A6%B8%E0%A7%8D%E0%A6%AF%E0%A6%BE">Issue</a></li></ul><p>এটি সম্পূর্ণ ওপেন সোর্স একটি প্রোজেক্ট</p></section></footer></div></div></div><script id="gatsby-script-loader">/*<![CDATA[*/window.page={"componentChunkName":"component---src-templates-cheatsheet-js","jsonName":"python-3-cheat-sheet-d1b","path":"/python3-cheat-sheet/"};window.dataPath="12/path---python-3-cheat-sheet-d-1-b-ede-CGZAPVbF77cs2MWxlcgsqB7miY";/*]]>*/</script><script id="gatsby-chunk-mapping">/*<![CDATA[*/window.___chunkMapping={"app":["/app-8edac72460a1255540d0.js"],"component---src-templates-cheatsheet-js":["/component---src-templates-cheatsheet-js-c05e456a705f6c4b4f2e.js"],"component---src-templates-printsheet-js":["/component---src-templates-printsheet-js-748c228e30c79529c65c.js"],"component---src-pages-404-js":["/component---src-pages-404-js-66b146e044d9fae2ac73.js"],"component---src-pages-index-js":["/component---src-pages-index-js-63fea5c4a40a2eed78c3.js"],"component---src-pages-singlepage-js":["/component---src-pages-singlepage-js-d0f96f8e7e0c2ad4a8b7.js"],"pages-manifest":["/pages-manifest-8266b87321e585232a80.js"]};/*]]>*/</script><script src="/webpack-runtime-73b22198aa612a34ce61.js" async=""></script><script src="/1-209954670220ae58f266.js" async=""></script><script src="/2-3c9e0141850a29903c41.js" async=""></script><script src="/3-f0e72b64e0b3f1a42116.js" async=""></script><script src="/styles-a3b7e19ee8b28c84a71b.js" async=""></script><script src="/app-8edac72460a1255540d0.js" async=""></script><script src="/component---src-templates-cheatsheet-js-c05e456a705f6c4b4f2e.js" async=""></script></body></html>
You can’t perform that action at this time.
