Python Slice Object
Postado 2023-02-27 22:23:14
0
8K
A slice object is used to specify how to slice a sequence. You can specify where to start the slicing, and where to end. You can also specify the step, which allows you to e.g. slice only every other item. Here's an example of the usage:
x = ("hi", "hello", "greetings", "hola")
y = slice(3)
print(x[y])
>> ("hi", "hello", "greetings")
Pesquisar
Categorias
- Arts
- Business
- Computers
- Jogos
- Health
- Início
- Kids and Teens
- Money
- News
- Recreation
- Reference
- Regional
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Leia Mais
Create AI with Python
If you’re just starting out in the artificial intelligence (AI) world, then Python is a...
Taking the First Steps into Computer Engineering
Simplified Computer Hardware DiagramA simplified diagram of computer hardware includes the...
CBS. WREG Channel 3, Live TV. Memphis, Tennessee, United States.
WREG-TV (UHF digital channel 28), is a CBS-affiliated television station located in Memphis,...
What Are My Financial Projections?
When starting or managing a business, one of the most important aspects to consider is your...
Поймай меня, если сможешь. Catch Me If You Can. (2002)
Фрэнк Эбегнейл успел поработать врачом, адвокатом и пилотом на пассажирской авиалинии – и...