Telegram Group & Telegram Channel
Что выведет этот код?

Ответ: 1.

Потому что все строки-литералы разделенные любым количеством пробелов соединяются в одну.

То есть:

"Hello" "World"
то же самое, что и "HelloWorld"


Это работает и с одинарными, двойными, тройными кавычками.

x = 'One' "Two" '''Three'''

print(x)
# OneTwoThree

Однако это работает только с литералами.

s1 = "String1"
s2 = "String2"

print(s1 s2)
# SyntaxError: invalid syntax.

В итоге у нас список из одного элемента:

["AppleBananaOrangePineapple"]

#strings #строки



tg-me.com/pythrone/8
Create:
Last Update:

Что выведет этот код?

Ответ: 1.

Потому что все строки-литералы разделенные любым количеством пробелов соединяются в одну.

То есть:

"Hello" "World"
то же самое, что и "HelloWorld"


Это работает и с одинарными, двойными, тройными кавычками.

x = 'One' "Two" '''Three'''

print(x)
# OneTwoThree

Однако это работает только с литералами.

s1 = "String1"
s2 = "String2"

print(s1 s2)
# SyntaxError: invalid syntax.

В итоге у нас список из одного элемента:

["AppleBananaOrangePineapple"]

#strings #строки

BY PyThrone




Share with your friend now:
tg-me.com/pythrone/8

View MORE
Open in Telegram


telegram Telegram | DID YOU KNOW?

Date: |

Unlimited members in Telegram group now

Telegram has made it easier for its users to communicate, as it has introduced a feature that allows more than 200,000 users in a group chat. However, if the users in a group chat move past 200,000, it changes into "Broadcast Group", but the feature comes with a restriction. Groups with close to 200k members can be converted to a Broadcast Group that allows unlimited members. Only admins can post in Broadcast Groups, but everyone can read along and participate in group Voice Chats," Telegram added.

Start with a fresh view of investing strategy. The combination of risks and fads this quarter looks to be topping. That means the future is ready to move in.Likely, there will not be a wholesale shift. Company actions will aim to benefit from economic growth, inflationary pressures and a return of market-determined interest rates. In turn, all of that should drive the stock market and investment returns higher.

telegram from cn


Telegram PyThrone
FROM USA