EADST

ValueError: invalid literal for int() with base 10

ValueError: invalid literal for int() with base 10 in Python.

Use eval() to avoid this error.

test = "1.234, 56.7890"
point = test.split(",")
# print(int(point[0])) ## ValueError: invalid literal for int() with base 10: '1.234'
print(int(point[0].split(".")[0])) # 1
print(eval(point[0])) # 1.234
print(int(eval(point[0]))) # 1
相关标签
About Me
XD
Goals determine what you are going to be.
Category
标签云
Breakpoint 多进程 Statistics PyTorch Firewall 强化学习 Base64 COCO 论文 TensorFlow Sklearn Website Augmentation MD5 签证 第一性原理 Diagram LLM Claude uwsgi LoRA Vim Plotly 财报 Disk Crawler UI ModelScope GPT4 PyCharm Password Transformers Algorithm 音频 DeepSeek Dataset v0.dev GPTQ Pytorch CTC Quantization Markdown Django Quantize logger RGB 图标 图形思考法 Qwen2 论文速读 Jupyter Logo PDB 递归学习法 FastAPI Image2Text Color diffusers GoogLeNet v2ray ResNet-50 Qwen2.5 PDF 算法题 Input Numpy Nginx Excel CV Miniforge JSON 飞书 阿里云 Datetime llama.cpp AI SQL Attention 继承 Github Anaconda Search Vmess Paper Template DeepStream Docker C++ 证件照 XML Safetensors Knowledge Web Qwen Domain icon CLAP OpenCV News Streamlit VGG-16 TensorRT Proxy Conda VPN Heatmap tqdm Hotel Bitcoin Shortcut Interview NLTK Freesound TTS git-lfs 域名 FP32 WAN HaggingFace Review YOLO Magnet Jetson uWSGI 报税 Plate Gemma hf CUDA SQLite OCR FP8 CAM LeetCode Data Use QWEN Hungarian EXCEL 多线程 XGBoost Distillation GGML 顶会 TSV Cloudreve 搞笑 Pillow torchinfo Tiktoken tar Linux Animate transformers IndexTTS2 ChatGPT Llama Baidu Windows SPIE Bipartite API Rebuttal Pickle Card BF16 Pandas LaTeX Bin CC PIP Michelin FP16 HuggingFace RAR ONNX printf 腾讯云 scipy 关于博主 Random 版权 BeautifulSoup CEIR Ubuntu Video Google InvalidArgumentError GIT Hilton BTC Paddle Permission Tracking 云服务器 UNIX Zip WebCrawler CSV Bert Tensor Translation OpenAI NLP Git Math SVR Ptyhon NameSilo LLAMA Mixtral FP64 Clash Food 公式 净利润 Agent Land git SAM mmap Python FlashAttention VSCode
站点统计

本站现有博文328篇,共被浏览850751

本站已经建立2557天!

热门文章
文章归档
回到顶部