ﻥﻮﺜﻳﺎﺑ ﻲﻓ ﺓﺪﻴﻔﻣ ﺔﻠﺴﻠﺳ ﻒﺋﺎﻇﻭ 7

.ﻥﻮﺜﻳﺎﺑ ﻲﻓ ﺓﺪﻴﻔﻣ ﺔﻠﺴﻠﺳ ﻒﺋﺎﻇﻭ 7 ﺔﻟﺎﻘﻤﻟﺍ ﻩﺬﻫ ﻲﻓ ﺶﻗﺎﻨﻨﺳ .ﺎﻬﺘﺠﻟﺎﻌﻣﻭ ﺔﻠﺴﻠﺴﻟﺍ ﺕﺎﻧﺎﻴﺑ

() ﻦﻴﻟ

- ﻮﻫ()len ﺔﻟﺍﺪﻟﺍ ﻡﺍﺪﺨﺘﺳﺍ ﺔﻠﻤﺟ ءﺎﻨﺑ .ﺔﺻﺎﺨﻟﺍ ﻑﺮﺣﻷﺍﻭ ﺕﺎﻓﺎﺴﻤﻟﺍ ﻚﻟﺫ ﻲﻓ ﺎﻤﺑ ﺔﻠﺴﻠﺴﻟﺍ

ﺔﻠﻤﺠﻟﺍ ءﺎﻨﺑ

len(your_string)

.ﺎﻬﻟﻮﻃ ﺔﻓﺮﻌﻣ ﺪﻳﺮﺗ ﻲﺘﻟﺍ ﺔﻠﺴﻠﺴﻟﺍ ﻲﻫ your_string.ﺔﻠﺴ

اقرأ أكثر →

ﻦﻴﺘﻔﻠﺘﺨﻣ ﻦﻴﺘﻠﺴﻠﺴﻟ ﻲﺋﺍﻮﺸﻋ ﻂﻠﺧ ﻦﻋ ﺓﺭﺎﺒﻋ ﺔﻠﺴﻠﺴﻟﺍ ﺖﻧﺎﻛ ﺍﺫﺇ ﺎﻤﻣ ﻖﻘﺤﺘﻠﻟ Python ﺞﻣﺎﻧﺮ

.ﻥﻮﺜﻳﺎﺑ ﻡﺪﺨﺘﺴﺗ ﻻ ﻡﺃ ﺔﺤﻟﺎﺻ ﺔﻠﺴﻠﺳ ﻲﻫ ﻦﻴﺘﻔﻠﺘﺨﻣ ﻦﻴﺘﻠﺴﻠﺳ ﻑﺮﺣﺃ ﻂﻠﺧ ﻖﻳﺮﻃ ﻦﻋ ﺎﻬﻠﻴﻜﺸﺗ ﻢ

ﺢﻴﺿﻮﺗ

- ﻦﻴﺘﻠﺴﻠﺳ ﻙﺎﻨﻫ ﻥﻮﻜﻳ ﻥﺃ ﺐﺠﻳ .ﻞﺳﻼﺴﻠﻟ ﺢﻴﺤﺼﻟﺍ ﻂﻠﺨﻟﺍ ﻢﻬﻔﻟ ﻻًﺎﺜﻣ ﺬﺧﺄﻨﻟ

S1 : abc S2 : def

“adbecf ”, “dabecf ” − ﻥﻮﻜﻴﺳ s2ﻭ s1 ﺔﻠﺴﻠﺴﻠﻟ ﺢﻴﺤﺼﻟﺍ ﻲﺋﺍﻮﺸﻌﻟﺍ ﻞﻳﺪﺒ

“abgfcd ”, ”tabcde ” − ﻥﻮﻜﻴﺳ s2ﻭ s1 ﺔﻠﺴﻠﺴﻠﻟ ﺢﻴﺤﺼﻟﺍ ﺮﻴﻏ ﻲﺋﺍﻮﺸﻌﻟﺍ

اقرأ أكثر →

ﺔﻠﺴﻠﺴﻠﻟ ﺖﻗﺆﻤﻟﺍ ﻥﺰﺨﻤﻟﺍ ﺢﺴﻤﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺔﻠﺜﻣﻷﺍ ﻡﺍﺪﺨﺘﺳﺎﺑ ﺔﻠﺴﻠﺴﻠﻟ ﺖﻗﺆﻤﻟﺍ ﻥﺰﺨﻤﻟﺍ ﺢﺴﻣ ﺔﻴﻔﻴﻛ ﻢﻬﻔﻧ ﻑﻮﺳ ،ﺔﻟﺎﻘﻤﻟﺍ ﻩﺬﻫ ﻲﻓ .ﺝﺍﺮ

ﺖﻗﺆﻤﻟﺍ ﻥﺰﺨﻤﻟﺍ ﻰﻟﺇ ﺔﻏﺭﺎﻓ ﺔﻠﺴﻠﺳ ﻦﻴﻴﻌﺗ :ﻰﻟﻭﻷﺍ ﺔﻘﻳﺮﻄﻟﺍ

.ﺖﻗﺆﻤﻟﺍ ﻥﺰﺨﻤﻟﺍ ﺢﺴﻤﻟ truncate() ﺔﻘﻳﺮﻃ ﻡﺍﺪﺨﺘﺳﺍ ﺎﻨﻨﻜﻤﻳ .ﺔﻏﺭﺎﻓ ﺔﻟﺎﺣ ﻰﻟﺇ ﻪﻨﻴ

ﻝﺎﺜﻣ

.getvalue() ﺔﻘﻳﺮﻃ ﻡﺍﺪﺨﺘﺳﺎﺑ ﺖﻗﺆﻤﻟﺍ ﻥﺰﺨﻤﻟﺍ ﺔﻠﺴﻠﺳ ﻊﺒﻄﻧﻭ fr

اقرأ أكثر →

ﻑﺮﺣﻷﺍ ﺔﻟﺎﺣ ﻞﻫﺎﺠﺗ ﻖﻳﺮﻃ ﻦﻋ ﻦﻴﺘﻠﺴﻠﺳ ﺔﻧﺭﺎﻘﻤﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺔﻠﺴﻠﺴﻟﺍ ﺕﻻﺎﺣ ﻞﻫﺎﺠﺗ ﻖﻳﺮﻃ ﻦﻋ ﻦﻴﺘﻠﺴﻠﺳ ﺔﻧﺭﺎﻘﻣ ﺎﻨﻨﻜﻤﻳ ﻒﻴﻛ ﻢﻬﻔﻧ ﻑﻮﺳ ،ﺔﻟﺎﻘﻤﻟﺍ ﻩﺬﻫ ﻲﻓ

ﺔﻟﺎﺤﻟﺍ ﻞﻫﺎﺠﺗ ﻊﻣ ﻞﺳﻼﺴﻟﺍ ﺔﻧﺭﺎﻘﻣ

.ﺔﻠﺴﻠﺴﻟﺍ ﺔﻟﺎﺣ ﻦﻴﻠﻫﺎﺠﺘﻣ ﻞﺳﻼﺴﻟﺍ ﺔﻧﺭﺎﻘﻣ ﺎﻨﻨﻜﻤﻳ ،ﺓﺮﻴﺒﻛ ﻭﺃ ﺓﺮﻴﻐﺻ ﻑﺮﺣﺃ ﻰﻟﺇ ﻞﻣﺎﻜﻟﺎﺑ ﻞ

1 ﻝﺎﺜﻣ

."ﻑﺮﺣﻷﺍ ﺔﻟﺎﺣ ﻞﻫﺎﺠﺗ ﻊﻣ ،ﺔﻳﻭﺎﺴﺘﻣ ﻞﺳﻼﺴﻟﺍ" ﻥﻮﻜﺘﺳ ﺩﻮﻜﻟﺍ ﺕﺎﺟﺮﺨﻣ ﻥﺈﻓ ،ﻥﺎﺘﻘﺑﺎﻄﺘﻣ ﻦﻴﺘﻠﺴ

st

اقرأ أكثر →

ﺔﻠﺴﻠﺳ ﻦﺋﺎﻛ ءﺎﺸﻧﻹ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﻥﻮﺜﻳﺎﺑ ﻲﻓ ﺔﻠﺴﻠﺳ ﻦﺋﺎﻛ ءﺎﺸﻧﺇ ﺎﻬﻟﻼﺧ ﻦﻣ ﺎﻨﻨﻜﻤﻳ ﻲﺘﻟﺍ ﺔﻔﻠﺘﺨﻤﻟﺍ ﻕﺮﻄﻟﺍ ﻰﻠﻋ ﺓﺮﻈﻧ ﻲﻘﻠﻨﺳ

ﺓﺩﺮﻔﻤﻟﺍ ﺱﺎﺒﺘﻗﻻﺍ ﺔﻣﻼﻋ ﻡﺍﺪﺨﺘﺳﺎﺑ ﺔﻠﺴﻠﺳ ﻦﺋﺎﻛ ءﺎﺸﻧﺇ :1 ﻝﺎﺜﻤﻟﺍ

.ﺮﻴﻐﺘﻤﻟ ﺓﺪﺣﺍﻭ ﺱﺎﺒﺘﻗﺍ ﺔﻣﻼﻋ ﻲﻓ ﺔﻨﻤﻀﻤﻟﺍ ﻑﺮﺣﻷﺍ ﻦﻣ ﺔﻠﺴﻠﺳ ﻦﻴﻴﻌﺗ ﻖﻳﺮﻃ ﻦﻋ ﺔﻃﺎﺴﺒﺑ ﺔﻠﺴﻠﺳ

my_string = 'Hello World!' print(my_string)

ﺝﺍﺮﺧﻹﺍ

Hello World!

اقرأ أكثر →

ﺔﻠﺴﻠﺴﻟﺍ ءﺎﻔﻴﺘﺳﺍ ﺢﻴﺿﻮﺘﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺔﻠﺴﻠﺴﻟﺍ ءﺎﻔﻴﺘﺳﺎﺑ ﻡﺎﻴﻘﻠﻟ ﻥﻮﺜﻳﺎﺑ ﻡﺍﺪﺨﺘﺳﺍ ﺎﻨﻨﻜﻤﻳ ﻒﻴﻛ ﻯﺮﻨﺳ ،ﺔﻟﺎﻘﻤﻟﺍ ﻩﺬﻫ ﻲﻓ .ﺔﻠﺴﻠﺳ

f ﺔﻠﺴﻠﺳ ﻡﺍﺪﺨﺘﺳﺍ :ﻰﻟﻭﻷﺍ ﺔﻘﻳﺮﻄﻟﺍ

.ﻞﻴﻐﺸﺘﻟﺍ ﺖﻗﻭ ﻲﻓ ﺎﻬﻤﻴﻴﻘﺗ ﻢﺘﻳ ﺔﻴﻜﻴﻣﺎﻨﻳﺩ ﻢﻴﻗ ﻰﻠﻋ ﺕﺍﺮﻴﺒﻌﺘﻟﺍ ﻩﺬﻫ ﻱﻮﺘﺤﺗ ﻥﺃ ﻦﻜﻤﻳ .{}

ﻝﺎﺜﻣ

.ﻞﻴﻐﺸﺘﻟﺍ ﺖﻗﻭ ﻲﻓ (ﻝﻮﻄﻟﺍﻭ ﺮﻤﻌﻟﺍﻭ ﻢﺳﻻﺍ) ﺕﺍﺮﻴﻐﺘﻤﻟﺍ ﻦﻣ ﺕﺍﺮﻴﺒﻌﺘﻟﺍ ﻩﺬﻫ ﺔﻤﻴﻗ ﺬﺧﺃ ﻢﺘﻳ .

nam

اقرأ أكثر →

()__eq__ﻭ == ﺔﻠﺴﻠﺴﻟﺍ ﻞﻴﻐﺸﺗ ﺔﻘﻳﺮﻃ ﻦﻴﺑ ﺰﻴﻴﻤﺘﻠﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺔﻴﺼﻨﻟﺍ ﻞﺳﻼﺴﻟﺍ ﻊﻣ ﺎﻬﻣﺍﺪﺨﺘﺳﺍ ﺪﻨﻋ() ﻱﻭﺎﺴﻳ ﺔﻘﻳﺮﻃﻭ == ﻞﻴﻐﺸﺘﻟﺍ ﻞﻣﺎﻋ ﻦﻴﺑ ﺰﻴﻴﻤﺘﻟﺍ ﺎﻨ

ﻥﻮﺜﻳﺎﺑ ﻲﻓ ﻞﻐﺸﻤﻟﺍ ==

.ﺓﺍﻭﺎﺴﻤﻠﻟ ﺔﻠﺴﻠﺴﻟﺍ ﺔﻤﻴﻗ ﻂﻘﻓ ﻥﺭﺎﻘﻳ ﻪﻧﺇ .ﺔﻔﻠﺘﺨﻣ ﺓﺮﻛﺍﺫ ﻊﻗﺍﻮﻣ ﻲﻓ ﻞﺳﻼﺴﻟﺍ ﻦﻳﺰﺨﺗ ﻢﺗ ﻮﻟ

ﻝﺎﺜﻣ

.ﺔﻳﻭﺎﺴﺘﻣ ﻦﻴﺘﻠﺴﻠﺴﻟﺍ ﺎﺘﻠﻛ ﺔﻤﻴﻗ ﻥﻷ ﺎﺤًﻴﺤﺻ ﻊﺟﺮﺗُ ﺎﻬﻧﺈﻓ ، == ﻞﻴﻐﺸﺘﻟﺍ ﻞﻣﺎﻋ ﻊﻣ <

s

اقرأ أكثر →

'N' ﺔﻳﻭﺎﺴﺘﻣ ءﺍﺰﺟﺃ ﻰﻟﺇ ﺔﻠﺴﻠﺳ ﻢﻴﺴﻘﺘﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﻥﻮﺜﻳﺎﺑ ﻲﻓ ﻊﻴﻄﻘﺘﻟﺍ ﺔﻘﻳﺮﻃ ﻡﺍﺪﺨﺘﺳﺎﺑ ﺔﻳﻭﺎﺴﺘﻣ ءﺍﺰﺟﺃ N ﻰﻟﺇ ﺔﻴﺼﻧ ﺔﻠﺴﻠﺳ ﻢﻴﺴﻘﺗ ﺎﻨﻨﻜﻤﻳ

.ﺓﺮﻴﺧﻷﺍ ﺔﻴﻋﺮﻔﻟﺍ ﺔﻠﺴﻠﺴﻟﺍ ﻰﻟﺇ ﺎﻬﻔﻴﻀﻧ N ﺔﻳﻭﺎﺴﺘﻤﻟﺍ ءﺍﺰﺟﻷﺍ ﻲﻓ ﺎﻬﻌﻳﺯﻮﺗ ﻦﻜﻤﻳ ﻻ ﻲﺘﻟﺍﻭ

1 ﻝﺎﺜﻣ

- ﺔﻴﻟﺎﺘﻟﺍ ﺕﺍءﺍﺮﺟﻹﺍ ﺬﻴﻔﻨﺘﺑ Division_string ﺔﻟﺍﺪﻟﺍ ﻡﻮﻘﺗ .ﺕﺎﺟﺮﺨﻤﻛ N ﺔﻳﻭﺎﺴﺘﻤﻟﺍ ﺔﻴﻋ

  • .(N) ءﺍﺰﺟﻷﺍ ﺩﺪﻋ ﻰﻠﻋ ﺔﻴﻠﺻﻷﺍ ﺔﻠﺴﻠﺴﻟﺍ ﻝﻮﻃ ﺔﻤﺴﻗ ﻖﻳﺮﻃ ﻦﻋ ﺔﻴﻋﺮﻓ ﺔﻠﺴﻠﺳ ﻞﻛ ﻝﻮﻃ ﺐﺴﺣﺍ

  • .ﺔﻠﺴﻠﺴﻟﺍ ﺔﻳﺎﻬ

    اقرأ أكثر →

ﺔﻠﺴﻠﺴﻟ ﺔﻴﻋﺮﻔﻟﺍ ﺕﺎﻋﻮﻤﺠﻤﻟﺍ ﺔﻓﺎﻛ ﻰﻠﻋ ﺭﻮﺜﻌﻠﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺔﻠﺴﻠﺴﻟﺍ ﻲﻓ ﻑﺮﺣﻷﺍ ﻦﻣ ﺔﻨﻜﻤﻤﻟﺍ ﺕﺎﻋﻮﻤﺠﻤﻟﺍ ﻊﻴﻤﺟ ءﺎﺸﻧﺇ ﻖﻳﺮﻃ ﻦﻋ ﺎﻣ ﺔﻠﺴﻠﺴﻟ ﺔﻴﻋﺮﻔﻟﺍ ﺕﺎ

ﺔﻠﻤﺠﻟﺍ ءﺎﻨﺑ

itertools.combination(string,r)

.ﺔﻨﻜﻤﻤﻟﺍ ﺔﻠﺴﻠﺴﻟﺍ ﻑﺮﺣﺃ ﺕﺎﻋﻮﻤﺠﻣ ﺔﻓﺎﻛ ﻉﺎﺟﺭﺈﺑ ﻡﻮﻘﺗﻭ .ﺔﻨﻜﻤﻤﻟﺍ ﻞﺳﻼﺴﻟﺍ ﻦﻣ ﺔﻔﻠﺘﺨﻣ ﺕﺎﻋﻮ

ﺔﻴﻣﺯﺭﺍﻮﺧ

ﺓﺎﻄﻌﻤﻟﺍ ﺔﻠﺴﻠﺴﻟﺍ ﻦﻣ ﻑﺮﺣ ﻰﻠﻋ ﻝﻮﺼﺤﻠﻟ ﻥﻮﺜﻳﺎﺑ ﺞﻣﺎﻧﺮﺑ

.ﺱﺮﻬﻔﻟﺍ ﻞﻣﺎﻋ ﻡﺍﺪﺨﺘﺳﺎﺑ ﺔﻠﺴﻠﺴﻟﺍ ﻑﺮﺣ ﻰﻟﺇ ﻝﻮﺻﻮﻟﺍ ﺎﻨﻨﻜﻤﻳ ﻒﻴﻛ ﻯﺮﻨﺳ ،ﺔﻟﺎﻘﻤﻟﺍ ﻩﺬﻫ ﻲﻓ .

ﻞﻐﺸﻤﻟﺍ [ ] ﻡﺍﺪﺨﺘﺳﺎﺑ

ﺔﻠﻤﺠﻟﺍ ءﺎﻨﺑ

string[index]

.ﺔﻠﺴﻠﺴﻟﺍ ﻲﻓ ﺩﻮﺟﻮﻤﻟﺍ ﻑﺮﺤﻟﺍ ﺱﺮﻬﻓ ﻮﻫ ﺱﺮﻬﻔﻟﺍ .ﺎﻬﻨﻣ ﻦﻴﻌﻣ ﻑﺮﺣ ﻰﻟﺇ ﻝﻮﺻﻮﻟﺍ ﺪﻳﺮﻧ ﻲﺘﻟﺍ ﺓ

اقرأ أكثر →