C
C
colcefer2021-10-28 23:13:41
Python
colcefer, 2021-10-28 23:13:41

Finding a string in python text?

There is a text in a variable like this, the bot gets the name "BTC" for example. Can you find the line in the text with the text BTC?)
BTC $58764.60 -5.54% 35%
ETH $3974.78 -7.01% 46%
BNB $452.37 -7.16% 34%
ADA $1.9357 -11.72% 16%
SOL $188.28 -9.35% 42%
XRP $1.0085 -10.7% 26%
DOT $ 40.9002 -10.2% 41%
DOGE $ 0.2391 -10.67% 35%
luna $ 40.6246 -12.9% 54%
AVAX $ 62.4021 -12.41% 49%
Link $ 29.3059 -13.72%
UNI $ 24.6077 -11.91.111.11.11.11.111.11.11
. %
MATIC $1.7715 -2.29% 72%
ALGO $1.8382 -9.83% 58%
ATOM $38.3380 -6.62% 79%
BCH $557.68 -10.26% 23%
VET $0.1269 -14.01% 52%
XLM $0.3385 -11.89% 33%
FTM $3.1098 -3.14% 88%
AXS $122.88 -8.19% 42%
ICP $41.3703 -15.17% 3%
FTT $57.8861 -10.99% 48%
FIL $56.2377 -12.45% 11%

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ronald McDonald, 2021-10-28
@colcefer

contains()
Loop through each line.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question