当前位置:网站首页>Please use the learned knowledge to write a program to find out the password hidden in the long string below. The burial point of the password conforms to the following rules:
Please use the learned knowledge to write a program to find out the password hidden in the long string below. The burial point of the password conforms to the following rules:
2022-06-29 09:48:00 【qq_ forty-three million six hundred and fourteen thousand three】
Little turtle
- Please write the program with the knowledge you have learned , Find out the password of the little turtle hidden in the long string below , The burial point of the password conforms to the following rules :
a) Each password is a single lowercase letter
b) Each password has only three capital letters on the left and right
Today, I just finished learning regular expressions and saw this problem , Now it feels much simpler to write in regular expressions
import re # Import re modular
def fn():
f = open('string2.txt','r')
a = f.read()
l = re.findall('[^A-Z]{1}[A-Z]{3}[a-z]{1}[A-Z]{3}[^A-Z]{1}',a)
''' Choose the letter range that meets the requirements of the topic . Small letters in the middle , There are only three large passwords on the left and right sides of the password
Write letters ( Explain that after the three capital letters on both sides, as long as they are non capital letters, the conditions are met ), A list is returned '''
for i in l: # Traverse the list
print(i[4],end=' ') # Print fourth letter
fn()
边栏推荐
- Data governance: the solution of data governance in the data Arena
- CROSSFORMER: A VERSATILE VISION TRANSFORMER BASED ON CROSS-SCALE ATTENTION
- Data visualization: the significance of data visualization
- Research progress of target detection in the era of deep convolutional neural network
- Data governance: data standard management (Part III)
- 基于PyQt5和Qt Designer的简易加法计算器的制作
- Cloud management platform: 9 open source cloud management platforms (CMP)
- Invalidconnectionattributeexception exception exception handling
- 【华为认证】HCIA-DATACOM史上最全精选题库(附答案解析)
- 转载 :判断对象是否具有属性的5种方法
猜你喜欢

Matlab tips (21) matrix analysis -- partial least squares regression

KiCad学习笔记--快捷键

UE4 remove the mask transparent white edge in the material

UE4 animation redirection

1.4 regression of machine learning methods

UE4 材质UV纹理不随模型缩放拉伸

1.4 机器学习方法之回归问题

Chang'an chain go language smart contract writing and compilation

How to do unit test well

User level threads and kernel level threads
随机推荐
1.4 regression of machine learning methods
数据治理:数据标准管理(第三篇)
Deep Learning-based Automated Delineation of Head and Neck Malignant Lesions from PET Images
367. 有效的完全平方数-二分法
基于keil5自动配置stm32f103标准库的官网freertos移植
Factory mode
How to do unit test well
官方stm32芯片包下载地址 stm32f10x stm32f40x下载
《网络是怎么样连接的》读书笔记 - WEB服务端请求和响应(五)
A comparison of methods for fully automatic segmentation of tumors and involved nodes in PET/CT of h
User level threads and kernel level threads
1424. diagonal traversal II
Cloud management platform: 9 open source cloud management platforms (CMP)
商业智能BI的未来,如何看待AI+BI这种模式?
Official STM32 chip package download address stm32f10x stm32f40x Download
IDEA调试失败,报JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_LOAD(196)
Closed door cultivation (24) shallow understanding of cross domain problems
Is it safe to open an account for stock speculation? Is it reliable?
用户级线程和内核级线程
[Huawei certification] the most complete and selected question bank in hcia-datacom history (with answer analysis)