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
标签云
Michelin Animate NLP Clash 音频 logger Hilton Sklearn WebCrawler Web v2ray Password XGBoost 继承 RAR Transformers Paper Algorithm PIP Crawler 阿里云 GoogLeNet Data SPIE PyCharm Diagram Windows LLM Interview CC Numpy BF16 TensorRT ONNX Ptyhon Tensor 飞书 EXCEL torchinfo LaTeX SQLite BeautifulSoup UI DeepStream GIT FlashAttention CLAP BTC Knowledge Qwen Qwen2 Plate Disk Firewall Github LoRA DeepSeek Dataset Django 视频信息 Heatmap Jupyter NameSilo tqdm VGG-16 Hotel Claude scipy 关于博主 PyTorch v0.dev HuggingFace Miniforge Cloudreve Video 证件照 Shortcut Image2Text Website Random Base64 SVR 签证 Food Excel Hungarian Bipartite Use Gemma CEIR OpenCV 腾讯云 Augmentation Jetson COCO PDB Mixtral GGML LeetCode Pandas mmap Streamlit ResNet-50 FP16 Markdown Paddle TTS Statistics Zip CAM Pytorch Proxy 算法题 transformers API Land printf CTC TSV NLTK Permission 净利润 UNIX Translation 财报 Bert TensorFlow QWEN Conda Baidu 公式 Git OpenAI 多进程 Review FP32 CUDA Attention Linux ChatGPT uWSGI InvalidArgumentError VPN SQL Domain diffusers 报税 Magnet Freesound 版权 多线程 Datetime Input XML Vmess WAN 域名 hf Anaconda Bitcoin Quantize Pillow C++ Distillation LLAMA GPT4 Tracking Logo CV PDF HaggingFace JSON VSCode Bin Docker IndexTTS2 Plotly Python AI Llama git-lfs OCR Template Tiktoken FP8 tar Safetensors GPTQ ModelScope RGB Google MD5 git Color 搞笑 Quantization CSV Math FastAPI Nginx llama.cpp FP64 Breakpoint Card Ubuntu YOLO Pickle uwsgi Qwen2.5 SAM Vim
站点统计

本站现有博文311篇,共被浏览739835

本站已经建立2376天!

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